- All Superinterfaces:
ClassElement,ClassFileElement
Models the interfaces (JVMS ) of a class. An
Interfaces
appears at most once in a ClassModel: if it does not appear, the
class has no interfaces, which is equivalent to an Interfaces whose
interfaces() returns an empty list. A ClassBuilder sets
the interfaces to an empty list if the interfaces is not supplied.- Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the interfaces of this class, may be empty.static Interfacesof(ClassEntry... interfaces) Returns an Interfaces element.static Interfacesof(List<ClassEntry> interfaces) Returns an Interfaces element.static InterfacesReturns an Interfaces element.static InterfacesReturns an Interfaces element.
-
Method Details
-
interfaces
List<ClassEntry> interfaces()Returns the interfaces of this class, may be empty.- Returns:
- the interfaces of this class, may be empty
-
of
Returns an Interfaces element.- Parameters:
interfaces- the interfaces- Returns:
- an Interfaces element
- Throws:
IllegalArgumentException- if the number of interfaces exceeds the limit ofu2
-
of
Returns an Interfaces element.- Parameters:
interfaces- the interfaces- Returns:
- an Interfaces element
- Throws:
IllegalArgumentException- if the number of interfaces exceeds the limit ofu2
-
ofSymbols
Returns an Interfaces element.- Parameters:
interfaces- the interfaces- Returns:
- an Interfaces element
- Throws:
IllegalArgumentException- if any ofinterfacesis primitive, or if the number of interfaces exceeds the limit ofu2
-
ofSymbols
Returns an Interfaces element.- Parameters:
interfaces- the interfaces- Returns:
- an Interfaces element
- Throws:
IllegalArgumentException- if any ofinterfacesis primitive, or if the number of interfaces exceeds the limit ofu2
-