repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listSessions | public ListSessionsResponse listSessions(ListSessionsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_SESSION);
if (request.getStatus() != null) {
checkStringNotEm... | java | public ListSessionsResponse listSessions(ListSessionsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_SESSION);
if (request.getStatus() != null) {
checkStringNotEm... | [
"public",
"ListSessionsResponse",
"listSessions",
"(",
"ListSessionsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"createRequest",
"(",
"HttpMethodName"... | List all your live sessions.
@param request The request object containing all parameters for listing live sessions.
@return The list of all your live sessions. | [
"List",
"all",
"your",
"live",
"sessions",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L567-L576 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listApp | public ListAppResponse listApp(ListAppRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_APP);
return invokeHttpClient(internalRequest, ListAppResponse.class);
} | java | public ListAppResponse listApp(ListAppRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_APP);
return invokeHttpClient(internalRequest, ListAppResponse.class);
} | [
"public",
"ListAppResponse",
"listApp",
"(",
"ListAppRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"createRequest",
"(",
"HttpMethodName",
".",
"GET... | list all your apps
@param request The request object containing all parameters for list all apps.
@return the response | [
"list",
"all",
"your",
"apps"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L821-L825 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listAppStreams | public ListAppStreamsResponse listAppStreams(String app) {
ListAppStreamsRequest request = new ListAppStreamsRequest();
request.setApp(app);
return listAppStreams(request);
} | java | public ListAppStreamsResponse listAppStreams(String app) {
ListAppStreamsRequest request = new ListAppStreamsRequest();
request.setApp(app);
return listAppStreams(request);
} | [
"public",
"ListAppStreamsResponse",
"listAppStreams",
"(",
"String",
"app",
")",
"{",
"ListAppStreamsRequest",
"request",
"=",
"new",
"ListAppStreamsRequest",
"(",
")",
";",
"request",
".",
"setApp",
"(",
"app",
")",
";",
"return",
"listAppStreams",
"(",
"request"... | list your streams by app name
@param app app name
@return the response | [
"list",
"your",
"streams",
"by",
"app",
"name"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L877-L881 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.startRecording | public StartRecordingResponse startRecording(String sessionId, String recording) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
checkStringNotEmpty(recording, "The parameter recording should NOT be null or empty string.");
StartRecordingRequest r... | java | public StartRecordingResponse startRecording(String sessionId, String recording) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
checkStringNotEmpty(recording, "The parameter recording should NOT be null or empty string.");
StartRecordingRequest r... | [
"public",
"StartRecordingResponse",
"startRecording",
"(",
"String",
"sessionId",
",",
"String",
"recording",
")",
"{",
"checkStringNotEmpty",
"(",
"sessionId",
",",
"\"The parameter sessionId should NOT be null or empty string.\"",
")",
";",
"checkStringNotEmpty",
"(",
"reco... | Start live session recording.
@param sessionId Live session id.
@param recording Live recording preset name.
@return the response | [
"Start",
"live",
"session",
"recording",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1047-L1054 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.stopRecording | public StopRecordingResponse stopRecording(String sessionId) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
StopRecordingRequest request = new StopRecordingRequest().withSessionId(sessionId);
InternalRequest internalRequest = createRequest(HttpMe... | java | public StopRecordingResponse stopRecording(String sessionId) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
StopRecordingRequest request = new StopRecordingRequest().withSessionId(sessionId);
InternalRequest internalRequest = createRequest(HttpMe... | [
"public",
"StopRecordingResponse",
"stopRecording",
"(",
"String",
"sessionId",
")",
"{",
"checkStringNotEmpty",
"(",
"sessionId",
",",
"\"The parameter sessionId should NOT be null or empty string.\"",
")",
";",
"StopRecordingRequest",
"request",
"=",
"new",
"StopRecordingRequ... | Stop live session recording.
@param sessionId Live session id.
@return the response | [
"Stop",
"live",
"session",
"recording",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1062-L1068 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getSessionSourceInfo | public GetSessionSourceInfoResponse getSessionSourceInfo(String sessionId) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
GetSessionSourceInfoRequest request = new GetSessionSourceInfoRequest();
InternalRequest internalRequest = createRequest(Htt... | java | public GetSessionSourceInfoResponse getSessionSourceInfo(String sessionId) {
checkStringNotEmpty(sessionId, "The parameter sessionId should NOT be null or empty string.");
GetSessionSourceInfoRequest request = new GetSessionSourceInfoRequest();
InternalRequest internalRequest = createRequest(Htt... | [
"public",
"GetSessionSourceInfoResponse",
"getSessionSourceInfo",
"(",
"String",
"sessionId",
")",
"{",
"checkStringNotEmpty",
"(",
"sessionId",
",",
"\"The parameter sessionId should NOT be null or empty string.\"",
")",
";",
"GetSessionSourceInfoRequest",
"request",
"=",
"new",... | Get your live session source info by live session id.
@param sessionId Live session id.
@return Your live session source info | [
"Get",
"your",
"live",
"session",
"source",
"info",
"by",
"live",
"session",
"id",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1076-L1082 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getRecording | public GetRecordingResponse getRecording(String recording) {
checkStringNotEmpty(recording, "The parameter recording should NOT be null or empty string.");
GetRecordingRequest request = new GetRecordingRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, RECORD... | java | public GetRecordingResponse getRecording(String recording) {
checkStringNotEmpty(recording, "The parameter recording should NOT be null or empty string.");
GetRecordingRequest request = new GetRecordingRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, RECORD... | [
"public",
"GetRecordingResponse",
"getRecording",
"(",
"String",
"recording",
")",
"{",
"checkStringNotEmpty",
"(",
"recording",
",",
"\"The parameter recording should NOT be null or empty string.\"",
")",
";",
"GetRecordingRequest",
"request",
"=",
"new",
"GetRecordingRequest"... | Get your live recording preset by live recording preset name.
@param recording Live recording preset name.
@return Your live recording preset | [
"Get",
"your",
"live",
"recording",
"preset",
"by",
"live",
"recording",
"preset",
"name",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1125-L1130 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listRecordings | public ListRecordingsResponse listRecordings() {
GetRecordingRequest request = new GetRecordingRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, RECORDING);
return invokeHttpClient(internalRequest, ListRecordingsResponse.class);
} | java | public ListRecordingsResponse listRecordings() {
GetRecordingRequest request = new GetRecordingRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, RECORDING);
return invokeHttpClient(internalRequest, ListRecordingsResponse.class);
} | [
"public",
"ListRecordingsResponse",
"listRecordings",
"(",
")",
"{",
"GetRecordingRequest",
"request",
"=",
"new",
"GetRecordingRequest",
"(",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"createRequest",
"(",
"HttpMethodName",
".",
"GET",
",",
"request",
",",... | List all your live recording presets.
@return The list of all your live recording preset. | [
"List",
"all",
"your",
"live",
"recording",
"presets",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1137-L1141 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listNotifications | public ListNotificationsResponse listNotifications() {
ListNotificationsRequest request = new ListNotificationsRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_NOTIFICATION);
return invokeHttpClient(internalRequest, ListNotificationsResponse.class);
... | java | public ListNotificationsResponse listNotifications() {
ListNotificationsRequest request = new ListNotificationsRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_NOTIFICATION);
return invokeHttpClient(internalRequest, ListNotificationsResponse.class);
... | [
"public",
"ListNotificationsResponse",
"listNotifications",
"(",
")",
"{",
"ListNotificationsRequest",
"request",
"=",
"new",
"ListNotificationsRequest",
"(",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"createRequest",
"(",
"HttpMethodName",
".",
"GET",
",",
"... | List all your live notifications.
@return The list of all your live notifications | [
"List",
"all",
"your",
"live",
"notifications",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1149-L1153 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.createNotification | public CreateNotificationResponse createNotification(CreateNotificationRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getName(),
"The parameter name should NOT be null or empty string.");
checkStringNotEmpty(req... | java | public CreateNotificationResponse createNotification(CreateNotificationRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getName(),
"The parameter name should NOT be null or empty string.");
checkStringNotEmpty(req... | [
"public",
"CreateNotificationResponse",
"createNotification",
"(",
"CreateNotificationRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getName",
"(",
"... | Create a live notification in the live stream service.
@param request The request object containing all options for creating live notification.
@return the response | [
"Create",
"a",
"live",
"notification",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1226-L1236 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listSecurityPolicies | public ListSecurityPoliciesResponse listSecurityPolicies() {
ListSecurityPoliciesRequest request = new ListSecurityPoliciesRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_SECURITY_POLICY);
return invokeHttpClient(internalRequest, ListSecurityPoliciesR... | java | public ListSecurityPoliciesResponse listSecurityPolicies() {
ListSecurityPoliciesRequest request = new ListSecurityPoliciesRequest();
InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_SECURITY_POLICY);
return invokeHttpClient(internalRequest, ListSecurityPoliciesR... | [
"public",
"ListSecurityPoliciesResponse",
"listSecurityPolicies",
"(",
")",
"{",
"ListSecurityPoliciesRequest",
"request",
"=",
"new",
"ListSecurityPoliciesRequest",
"(",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"createRequest",
"(",
"HttpMethodName",
".",
"GET"... | List all your live security policys.
@return The list of all your live security policys | [
"List",
"all",
"your",
"live",
"security",
"policys",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1243-L1247 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listDomainApp | public ListDomainAppResponse listDomainApp(ListDomainAppRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getPlayDomain(), "playDomain should NOT be empty.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET,
... | java | public ListDomainAppResponse listDomainApp(ListDomainAppRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getPlayDomain(), "playDomain should NOT be empty.");
InternalRequest internalRequest = createRequest(HttpMethodName.GET,
... | [
"public",
"ListDomainAppResponse",
"listDomainApp",
"(",
"ListDomainAppRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getPlayDomain",
"(",
")",
","... | List a domain's app in the live stream service.
@param request The request object containing all options for listing domain's app
@return the response | [
"List",
"a",
"domain",
"s",
"app",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1435-L1443 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamPresets | public void updateStreamPresets(UpdateStreamPresetsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkStrin... | java | public void updateStreamPresets(UpdateStreamPresetsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkStrin... | [
"public",
"void",
"updateStreamPresets",
"(",
"UpdateStreamPresetsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"(",
")",
",",
"\"Do... | Update stream's presets in the live stream service
@param request THe request object containing all options for updating presets | [
"Update",
"stream",
"s",
"presets",
"in",
"the",
"live",
"stream",
"service"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1600-L1613 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamPresets | public void updateStreamPresets(String domain, String app, String stream, Map<String, String> presets) {
UpdateStreamPresetsRequest request = new UpdateStreamPresetsRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withPresets(preset... | java | public void updateStreamPresets(String domain, String app, String stream, Map<String, String> presets) {
UpdateStreamPresetsRequest request = new UpdateStreamPresetsRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withPresets(preset... | [
"public",
"void",
"updateStreamPresets",
"(",
"String",
"domain",
",",
"String",
"app",
",",
"String",
"stream",
",",
"Map",
"<",
"String",
",",
"String",
">",
"presets",
")",
"{",
"UpdateStreamPresetsRequest",
"request",
"=",
"new",
"UpdateStreamPresetsRequest",
... | Update stream's presets
@param domain The requested domain which the specific stream belongs to
@param app The requested app which the specific stream belongs to
@param stream The requested stream which need to update the presets
@param presets The new presets is setting to the specific stream;
it's a map, and key is l... | [
"Update",
"stream",
"s",
"presets"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1624-L1631 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamRecording | public void updateStreamRecording(UpdateStreamRecordingRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkS... | java | public void updateStreamRecording(UpdateStreamRecordingRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkS... | [
"public",
"void",
"updateStreamRecording",
"(",
"UpdateStreamRecordingRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"(",
")",
",",
"... | Update stream recording in the live stream service
@param request The request object containing all options for updating recording | [
"Update",
"stream",
"recording",
"in",
"the",
"live",
"stream",
"service"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1639-L1653 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamRecording | public void updateStreamRecording(String domain, String app, String stream, String recording) {
UpdateStreamRecordingRequest request = new UpdateStreamRecordingRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withRecording(recording... | java | public void updateStreamRecording(String domain, String app, String stream, String recording) {
UpdateStreamRecordingRequest request = new UpdateStreamRecordingRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withRecording(recording... | [
"public",
"void",
"updateStreamRecording",
"(",
"String",
"domain",
",",
"String",
"app",
",",
"String",
"stream",
",",
"String",
"recording",
")",
"{",
"UpdateStreamRecordingRequest",
"request",
"=",
"new",
"UpdateStreamRecordingRequest",
"(",
")",
".",
"withDomain... | Update stream recording in live stream service
@param domain The requested domain which the specific stream belongs to
@param app The requested app which the specific stream belongs to
@param stream The requested stream which need to update the recording
@param recording The new recording's name | [
"Update",
"stream",
"recording",
"in",
"live",
"stream",
"service"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1664-L1671 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamPullUrl | public void updateStreamPullUrl(UpdateStreamPullUrlRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkStrin... | java | public void updateStreamPullUrl(UpdateStreamPullUrlRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty");
checkStrin... | [
"public",
"void",
"updateStreamPullUrl",
"(",
"UpdateStreamPullUrlRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"(",
")",
",",
"\"Do... | Update stream pullUrl in live stream service
@param request The request object containing all options for updating pull url | [
"Update",
"stream",
"pullUrl",
"in",
"live",
"stream",
"service"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1713-L1725 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamPullUrl | public void updateStreamPullUrl(String domain, String app, String stream, String pullUrl) {
UpdateStreamPullUrlRequest request = new UpdateStreamPullUrlRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withPullUrl(pullUrl);
u... | java | public void updateStreamPullUrl(String domain, String app, String stream, String pullUrl) {
UpdateStreamPullUrlRequest request = new UpdateStreamPullUrlRequest()
.withDomain(domain)
.withApp(app)
.withStream(stream)
.withPullUrl(pullUrl);
u... | [
"public",
"void",
"updateStreamPullUrl",
"(",
"String",
"domain",
",",
"String",
"app",
",",
"String",
"stream",
",",
"String",
"pullUrl",
")",
"{",
"UpdateStreamPullUrlRequest",
"request",
"=",
"new",
"UpdateStreamPullUrlRequest",
"(",
")",
".",
"withDomain",
"("... | Update stream's destination push url
@param domain The requested domain which the specific stream belongs to
@param app The requested app which the specific stream belongs to
@param stream The requested stream which need to update pull url
@param pullUrl The new pull url is setting to this specific stream | [
"Update",
"stream",
"s",
"destination",
"push",
"url"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1735-L1742 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateStreamDestinationPushUrl | public void updateStreamDestinationPushUrl(UpdateStreamDestinationPushUrlRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty... | java | public void updateStreamDestinationPushUrl(UpdateStreamDestinationPushUrlRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
checkStringNotEmpty(request.getApp(), "App should NOT be empty... | [
"public",
"void",
"updateStreamDestinationPushUrl",
"(",
"UpdateStreamDestinationPushUrlRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"(",... | Update stream destination push url in live stream service
@param request The request object containing all options for updating destination push url | [
"Update",
"stream",
"destination",
"push",
"url",
"in",
"live",
"stream",
"service"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1748-L1759 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getDomainStatistics | public GetDomainStatisticsResponse getDomainStatistics(GetDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
InternalRequest internalRequest = createRequest(HttpMethodNam... | java | public GetDomainStatisticsResponse getDomainStatistics(GetDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be empty.");
InternalRequest internalRequest = createRequest(HttpMethodNam... | [
"public",
"GetDomainStatisticsResponse",
"getDomainStatistics",
"(",
"GetDomainStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"("... | get domain's statistics in the live stream service.
@param request The request object containing all options for getting domain's statistics
@return the response | [
"get",
"domain",
"s",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1783-L1799 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getDomainStatistics | public GetDomainStatisticsResponse getDomainStatistics(String domain) {
GetDomainStatisticsRequest request = new GetDomainStatisticsRequest();
request.setDomain(domain);
return getDomainStatistics(request);
} | java | public GetDomainStatisticsResponse getDomainStatistics(String domain) {
GetDomainStatisticsRequest request = new GetDomainStatisticsRequest();
request.setDomain(domain);
return getDomainStatistics(request);
} | [
"public",
"GetDomainStatisticsResponse",
"getDomainStatistics",
"(",
"String",
"domain",
")",
"{",
"GetDomainStatisticsRequest",
"request",
"=",
"new",
"GetDomainStatisticsRequest",
"(",
")",
";",
"request",
".",
"setDomain",
"(",
"domain",
")",
";",
"return",
"getDom... | Get domain's statistics in the live stream service.
@param domain The requested domain
@return the response | [
"Get",
"domain",
"s",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1807-L1811 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getAllDomainsPlayCount | public GetAllDomainsPlayCountResponse getAllDomainsPlayCount(GetAllDomainsStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getTimeInterval(), "timeInterval should NOT be null");
checkStringNotEmpty(request.getStartTime(... | java | public GetAllDomainsPlayCountResponse getAllDomainsPlayCount(GetAllDomainsStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getTimeInterval(), "timeInterval should NOT be null");
checkStringNotEmpty(request.getStartTime(... | [
"public",
"GetAllDomainsPlayCountResponse",
"getAllDomainsPlayCount",
"(",
"GetAllDomainsStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getTime... | get all domains' total play count statistics in the live stream service.
@param request The request object containing all options for getting all domains' play count statistics
@return the response | [
"get",
"all",
"domains",
"total",
"play",
"count",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1853-L1867 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getOneDomainPlayCount | public GetOneDomainPlayCountResponse getOneDomainPlayCount(GetOneDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkNotNull(request.getDomain(), "The domain parameter can not be null");
checkStringNotEmpty(request.getTimeInterval(), "time... | java | public GetOneDomainPlayCountResponse getOneDomainPlayCount(GetOneDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkNotNull(request.getDomain(), "The domain parameter can not be null");
checkStringNotEmpty(request.getTimeInterval(), "time... | [
"public",
"GetOneDomainPlayCountResponse",
"getOneDomainPlayCount",
"(",
"GetOneDomainStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkNotNull",
"(",
"request",
".",
"getDomain",
"("... | get one domain's play count statistics in the live stream service.
@param request The request object containing all options for getting one domain's play count statistics
@return the response | [
"get",
"one",
"domain",
"s",
"play",
"count",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1875-L1891 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listDomainStatistics | public ListDomainStatisticsResponse listDomainStatistics(ListDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getStartTime(), "startTime should NOT be empty");
InternalRequest internalRequest = createRequest(Http... | java | public ListDomainStatisticsResponse listDomainStatistics(ListDomainStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getStartTime(), "startTime should NOT be empty");
InternalRequest internalRequest = createRequest(Http... | [
"public",
"ListDomainStatisticsResponse",
"listDomainStatistics",
"(",
"ListDomainStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getStartTime",... | list domain's statistics in the live stream service.
@param request The request object containing all options for listing domain's traffic statistics
@return the response | [
"list",
"domain",
"s",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1989-L2010 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.listStreamStatistics | public ListStreamStatisticsResponse listStreamStatistics(ListStreamStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be null");
checkStringNotEmpty(request.getApp(), "App should NOT be nul... | java | public ListStreamStatisticsResponse listStreamStatistics(ListStreamStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be null");
checkStringNotEmpty(request.getApp(), "App should NOT be nul... | [
"public",
"ListStreamStatisticsResponse",
"listStreamStatistics",
"(",
"ListStreamStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
... | list domain's all streams statistics in the live stream service.
@param request The request object containing all options for listing domain's all streams traffic statistics
@return the response | [
"list",
"domain",
"s",
"all",
"streams",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L2018-L2049 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.getStreamStatistics | public GetStreamStatisticsResponse getStreamStatistics(GetStreamStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be null");
checkStringNotEmpty(request.getApp(), "App should NOT be null")... | java | public GetStreamStatisticsResponse getStreamStatistics(GetStreamStatisticsRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getDomain(), "Domain should NOT be null");
checkStringNotEmpty(request.getApp(), "App should NOT be null")... | [
"public",
"GetStreamStatisticsResponse",
"getStreamStatistics",
"(",
"GetStreamStatisticsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getDomain",
"("... | get a domain's all streams statistics in the live stream service.
@param request The request object containing all options for getting a domain's all streams
@return the response | [
"get",
"a",
"domain",
"s",
"all",
"streams",
"statistics",
"in",
"the",
"live",
"stream",
"service",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L2057-L2077 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.createVpc | public CreateVpcResponse createVpc(String name, String cidr) {
CreateVpcRequest request = new CreateVpcRequest();
request.withName(name).withCidr(cidr);
return createVpc(request);
} | java | public CreateVpcResponse createVpc(String name, String cidr) {
CreateVpcRequest request = new CreateVpcRequest();
request.withName(name).withCidr(cidr);
return createVpc(request);
} | [
"public",
"CreateVpcResponse",
"createVpc",
"(",
"String",
"name",
",",
"String",
"cidr",
")",
"{",
"CreateVpcRequest",
"request",
"=",
"new",
"CreateVpcRequest",
"(",
")",
";",
"request",
".",
"withName",
"(",
"name",
")",
".",
"withCidr",
"(",
"cidr",
")",... | Create a vpc with the specified options.
@param name The name of vpc
@param cidr The CIDR of vpc
@return List of vpcId newly created | [
"Create",
"a",
"vpc",
"with",
"the",
"specified",
"options",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L156-L160 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.listVpcs | public ListVpcsResponse listVpcs(ListVpcsRequest request) {
checkNotNull(request, "request should not be null.");
InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX);
if (request.getMarker() != null) {
internalRequest.addParameter("marker", r... | java | public ListVpcsResponse listVpcs(ListVpcsRequest request) {
checkNotNull(request, "request should not be null.");
InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX);
if (request.getMarker() != null) {
internalRequest.addParameter("marker", r... | [
"public",
"ListVpcsResponse",
"listVpcs",
"(",
"ListVpcsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"this",
".",
"createRequest",
"(",
"request",
",",
"Http... | Return a list of vpcs owned by the authenticated user.
@param request The request containing all options for listing own's vpc.
@return The response containing a list of vpcs owned by the authenticated user. | [
"Return",
"a",
"list",
"of",
"vpcs",
"owned",
"by",
"the",
"authenticated",
"user",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L200-L213 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.getVpc | public GetVpcResponse getVpc(GetVpcRequest getVpcRequest) {
checkNotNull(getVpcRequest, "request should not be null.");
checkNotNull(getVpcRequest.getVpcId(), "request vpcId should not be null.");
InternalRequest internalRequest = this.createRequest(
getVpcRequest, HttpMethodName... | java | public GetVpcResponse getVpc(GetVpcRequest getVpcRequest) {
checkNotNull(getVpcRequest, "request should not be null.");
checkNotNull(getVpcRequest.getVpcId(), "request vpcId should not be null.");
InternalRequest internalRequest = this.createRequest(
getVpcRequest, HttpMethodName... | [
"public",
"GetVpcResponse",
"getVpc",
"(",
"GetVpcRequest",
"getVpcRequest",
")",
"{",
"checkNotNull",
"(",
"getVpcRequest",
",",
"\"request should not be null.\"",
")",
";",
"checkNotNull",
"(",
"getVpcRequest",
".",
"getVpcId",
"(",
")",
",",
"\"request vpcId should n... | Get the detail information of specified vpc.
@param getVpcRequest The request containing all options for getting the vpc info.
@return A vpc detail model for the vpcId. | [
"Get",
"the",
"detail",
"information",
"of",
"specified",
"vpc",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L231-L237 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/vpc/VpcClient.java | VpcClient.modifyInstanceAttributes | public void modifyInstanceAttributes(String name, String vpcId) {
ModifyVpcAttributesRequest request = new ModifyVpcAttributesRequest();
modifyInstanceAttributes(request.withName(name).withVpcId(vpcId));
} | java | public void modifyInstanceAttributes(String name, String vpcId) {
ModifyVpcAttributesRequest request = new ModifyVpcAttributesRequest();
modifyInstanceAttributes(request.withName(name).withVpcId(vpcId));
} | [
"public",
"void",
"modifyInstanceAttributes",
"(",
"String",
"name",
",",
"String",
"vpcId",
")",
"{",
"ModifyVpcAttributesRequest",
"request",
"=",
"new",
"ModifyVpcAttributesRequest",
"(",
")",
";",
"modifyInstanceAttributes",
"(",
"request",
".",
"withName",
"(",
... | Modifying the special attribute to new value of the vpc owned by the user.
@param name The name of the vpc after modifying
@param vpcId the id of the vpc | [
"Modifying",
"the",
"special",
"attribute",
"to",
"new",
"value",
"of",
"the",
"vpc",
"owned",
"by",
"the",
"user",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L274-L277 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.getCluster | public GetClusterResponse getCluster(GetClusterRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.createRequest(
... | java | public GetClusterResponse getCluster(GetClusterRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.createRequest(
... | [
"public",
"GetClusterResponse",
"getCluster",
"(",
"GetClusterRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getClusterId",
"(",
")",
",",
"\"The parameter clu... | Describe the detail information of the target cluster.
@param request The request object containing the ID of the target cluster.
@return response containing the detail information of the target cluster. | [
"Describe",
"the",
"detail",
"information",
"of",
"the",
"target",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L167-L175 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.modifyInstanceGroups | public void modifyInstanceGroups(ModifyInstanceGroupsRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The clusterId should not be null or empty string.");
checkNotNull(request.getInstanceGroups(), "The instanceGroups should not... | java | public void modifyInstanceGroups(ModifyInstanceGroupsRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The clusterId should not be null or empty string.");
checkNotNull(request.getInstanceGroups(), "The instanceGroups should not... | [
"public",
"void",
"modifyInstanceGroups",
"(",
"ModifyInstanceGroupsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getClusterId",
"(",
")",
",",
"\"The cluster... | Modify the instance groups of the target cluster.
@param request The request containing the ID of BMR cluster and the instance groups to be modified. | [
"Modify",
"the",
"instance",
"groups",
"of",
"the",
"target",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L292-L332 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.terminateCluster | public void terminateCluster(TerminateClusterRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.createRequest(
... | java | public void terminateCluster(TerminateClusterRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.createRequest(
... | [
"public",
"void",
"terminateCluster",
"(",
"TerminateClusterRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getClusterId",
"(",
")",
",",
"\"The parameter clust... | Terminate a BMR cluster and release all the virtual machine instances.
@param request The request containing the ID of the cluster to be terminated. | [
"Terminate",
"a",
"BMR",
"cluster",
"and",
"release",
"all",
"the",
"virtual",
"machine",
"instances",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L339-L347 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.listInstanceGroups | public ListInstanceGroupsResponse listInstanceGroups(ListInstanceGroupsRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.crea... | java | public ListInstanceGroupsResponse listInstanceGroups(ListInstanceGroupsRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
InternalRequest internalRequest = this.crea... | [
"public",
"ListInstanceGroupsResponse",
"listInstanceGroups",
"(",
"ListInstanceGroupsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getClusterId",
"(",
")",
","... | List the instance groups of the target BMR cluster.
@param request containing the ID of target BMR cluster.
@return The response containing a list of InstanceGroup objects. | [
"List",
"the",
"instance",
"groups",
"of",
"the",
"target",
"BMR",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L364-L372 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.listInstances | public ListInstancesResponse listInstances(ListInstancesRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
checkStringNotEmpty(request.getInstanceGroupId(),
... | java | public ListInstancesResponse listInstances(ListInstancesRequest request) {
checkNotNull(request, "request should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");
checkStringNotEmpty(request.getInstanceGroupId(),
... | [
"public",
"ListInstancesResponse",
"listInstances",
"(",
"ListInstancesRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getClusterId",
"(",
")",
",",
"\"The para... | List the instances belonging to the target instance group in the BMR cluster.
@param request containing the ID of target BMR cluster and the ID of the instance group.
@return The response containing a list of Instance objects. | [
"List",
"the",
"instances",
"belonging",
"to",
"the",
"target",
"instance",
"group",
"in",
"the",
"BMR",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L390-L401 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.listInstances | public ListInstancesResponse listInstances(String clusterId, String instanceGroupId) {
return listInstances(new ListInstancesRequest().withClusterId(clusterId).withInstanceGroupId(instanceGroupId));
} | java | public ListInstancesResponse listInstances(String clusterId, String instanceGroupId) {
return listInstances(new ListInstancesRequest().withClusterId(clusterId).withInstanceGroupId(instanceGroupId));
} | [
"public",
"ListInstancesResponse",
"listInstances",
"(",
"String",
"clusterId",
",",
"String",
"instanceGroupId",
")",
"{",
"return",
"listInstances",
"(",
"new",
"ListInstancesRequest",
"(",
")",
".",
"withClusterId",
"(",
"clusterId",
")",
".",
"withInstanceGroupId"... | List the instances belonging to the target instance in the BMR cluster.
@param clusterId the ID of target BMR cluster.
@param instanceGroupId the ID of target instance group.
@return The response containing a list of Instance objects. | [
"List",
"the",
"instances",
"belonging",
"to",
"the",
"target",
"instance",
"in",
"the",
"BMR",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L410-L412 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/BmrClient.java | BmrClient.addSteps | public AddStepsResponse addSteps(AddStepsRequest request) {
checkNotNull(request, "request should not be null.");
checkNotNull(request.getSteps(), "The parameter steps should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string."... | java | public AddStepsResponse addSteps(AddStepsRequest request) {
checkNotNull(request, "request should not be null.");
checkNotNull(request.getSteps(), "The parameter steps should not be null.");
checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string."... | [
"public",
"AddStepsResponse",
"addSteps",
"(",
"AddStepsRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"request should not be null.\"",
")",
";",
"checkNotNull",
"(",
"request",
".",
"getSteps",
"(",
")",
",",
"\"The parameter steps should not be ... | Add steps to a BMR cluster.
@param request containing the ID of target BMR cluster and several steps to be added.
@return The response containing a list of IDs of newly added steps. | [
"Add",
"steps",
"to",
"a",
"BMR",
"cluster",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/BmrClient.java#L419-L478 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/doc/DocClient.java | DocClient.getDocumentImages | public GetDocumentImagesResponse getDocumentImages(String documentId) {
checkNotNull(documentId, "documentId should not be null.");
GetDocumentImagesRequest request = new GetDocumentImagesRequest();
request.setDocumentId(documentId);
InternalRequest internalRequest = this.createRequest(H... | java | public GetDocumentImagesResponse getDocumentImages(String documentId) {
checkNotNull(documentId, "documentId should not be null.");
GetDocumentImagesRequest request = new GetDocumentImagesRequest();
request.setDocumentId(documentId);
InternalRequest internalRequest = this.createRequest(H... | [
"public",
"GetDocumentImagesResponse",
"getDocumentImages",
"(",
"String",
"documentId",
")",
"{",
"checkNotNull",
"(",
"documentId",
",",
"\"documentId should not be null.\"",
")",
";",
"GetDocumentImagesRequest",
"request",
"=",
"new",
"GetDocumentImagesRequest",
"(",
")"... | get a Document Image list if Converted to image.
Make Sure the Document convert type is image, otherwise will throw BceServiceException
@param documentId the documentId need to get.
@return A GetDocumentImageResponse object containing the information returned by Document. | [
"get",
"a",
"Document",
"Image",
"list",
"if",
"Converted",
"to",
"image",
".",
"Make",
"Sure",
"the",
"Document",
"convert",
"type",
"is",
"image",
"otherwise",
"will",
"throw",
"BceServiceException"
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L517-L535 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/doc/DocClient.java | DocClient.listDocuments | public ListDocumentsResponse listDocuments() {
ListDocumentsRequest request = new ListDocumentsRequest();
InternalRequest internalRequest = this.createRequest(HttpMethodName.GET, request, DOC);
ListDocumentsResponse response;
try {
response = this.invokeHttpClient(internalReq... | java | public ListDocumentsResponse listDocuments() {
ListDocumentsRequest request = new ListDocumentsRequest();
InternalRequest internalRequest = this.createRequest(HttpMethodName.GET, request, DOC);
ListDocumentsResponse response;
try {
response = this.invokeHttpClient(internalReq... | [
"public",
"ListDocumentsResponse",
"listDocuments",
"(",
")",
"{",
"ListDocumentsRequest",
"request",
"=",
"new",
"ListDocumentsRequest",
"(",
")",
";",
"InternalRequest",
"internalRequest",
"=",
"this",
".",
"createRequest",
"(",
"HttpMethodName",
".",
"GET",
",",
... | list all Document.
@return A ListDocumentsResponse object containing the information returned by Document. | [
"list",
"all",
"Document",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L544-L559 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/doc/DocClient.java | DocClient.getDocumentDownload | public GetDocumentDownloadResponse getDocumentDownload(String documentId) {
checkNotNull(documentId, "documentId should not be null.");
GetDocumentDownloadRequest request = new GetDocumentDownloadRequest();
request.setDocumentId(documentId);
InternalRequest internalRequest = this.createR... | java | public GetDocumentDownloadResponse getDocumentDownload(String documentId) {
checkNotNull(documentId, "documentId should not be null.");
GetDocumentDownloadRequest request = new GetDocumentDownloadRequest();
request.setDocumentId(documentId);
InternalRequest internalRequest = this.createR... | [
"public",
"GetDocumentDownloadResponse",
"getDocumentDownload",
"(",
"String",
"documentId",
")",
"{",
"checkNotNull",
"(",
"documentId",
",",
"\"documentId should not be null.\"",
")",
";",
"GetDocumentDownloadRequest",
"request",
"=",
"new",
"GetDocumentDownloadRequest",
"(... | get a Document Download link.
@param documentId the documentId need to download.
@return A GetDocumentDownloadResponse object containing the information returned by Document. | [
"get",
"a",
"Document",
"Download",
"link",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L663-L681 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bos/model/FetchObjectRequest.java | FetchObjectRequest.setMode | public void setMode(String mode) {
checkNotNull(mode, "mode should not be null");
if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
this.mode = mode;
} else {
throw new IllegalArgumentException("illegal mode: " + mode);
}
} | java | public void setMode(String mode) {
checkNotNull(mode, "mode should not be null");
if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
this.mode = mode;
} else {
throw new IllegalArgumentException("illegal mode: " + mode);
}
} | [
"public",
"void",
"setMode",
"(",
"String",
"mode",
")",
"{",
"checkNotNull",
"(",
"mode",
",",
"\"mode should not be null\"",
")",
";",
"if",
"(",
"MODE_ASYNC",
".",
"equals",
"(",
"mode",
")",
"||",
"MODE_SYNC",
".",
"equals",
"(",
"mode",
")",
")",
"{... | Sets the mode of this fetching job.
@param mode The mode of this fetching job. | [
"Sets",
"the",
"mode",
"of",
"this",
"fetching",
"job",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/model/FetchObjectRequest.java#L103-L110 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/bmr/model/AddStepsRequest.java | AddStepsRequest.withStep | public AddStepsRequest withStep(StepConfig step) {
if (this.steps == null) {
this.steps = new ArrayList<StepConfig>();
}
this.steps.add(step);
return this;
} | java | public AddStepsRequest withStep(StepConfig step) {
if (this.steps == null) {
this.steps = new ArrayList<StepConfig>();
}
this.steps.add(step);
return this;
} | [
"public",
"AddStepsRequest",
"withStep",
"(",
"StepConfig",
"step",
")",
"{",
"if",
"(",
"this",
".",
"steps",
"==",
"null",
")",
"{",
"this",
".",
"steps",
"=",
"new",
"ArrayList",
"<",
"StepConfig",
">",
"(",
")",
";",
"}",
"this",
".",
"steps",
".... | Configure the step to be added.
@param step a StepConfig object to be added.
@return AddStepsRequest | [
"Configure",
"the",
"step",
"to",
"be",
"added",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bmr/model/AddStepsRequest.java#L73-L79 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/util/HttpUtils.java | HttpUtils.generateHostHeader | public static String generateHostHeader(URI uri) {
String host = uri.getHost();
if (isUsingNonDefaultPort(uri)) {
host += ":" + uri.getPort();
}
return host;
} | java | public static String generateHostHeader(URI uri) {
String host = uri.getHost();
if (isUsingNonDefaultPort(uri)) {
host += ":" + uri.getPort();
}
return host;
} | [
"public",
"static",
"String",
"generateHostHeader",
"(",
"URI",
"uri",
")",
"{",
"String",
"host",
"=",
"uri",
".",
"getHost",
"(",
")",
";",
"if",
"(",
"isUsingNonDefaultPort",
"(",
"uri",
")",
")",
"{",
"host",
"+=",
"\":\"",
"+",
"uri",
".",
"getPor... | Returns a host header according to the specified URI. The host header is generated with the same logic used by
apache http client, that is, append the port to hostname only if it is not the default port.
@param uri the URI
@return a host header according to the specified URI. | [
"Returns",
"a",
"host",
"header",
"according",
"to",
"the",
"specified",
"URI",
".",
"The",
"host",
"header",
"is",
"generated",
"with",
"the",
"same",
"logic",
"used",
"by",
"apache",
"http",
"client",
"that",
"is",
"append",
"the",
"port",
"to",
"hostnam... | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/util/HttpUtils.java#L169-L175 | train |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/moladb/model/Key.java | Key.withAttribute | public Key withAttribute(String attributeName, AttributeValue value) {
if (this.attributes == null) {
this.attributes = new HashMap<String, AttributeValue>();
}
attributes.put(attributeName, value);
return this;
} | java | public Key withAttribute(String attributeName, AttributeValue value) {
if (this.attributes == null) {
this.attributes = new HashMap<String, AttributeValue>();
}
attributes.put(attributeName, value);
return this;
} | [
"public",
"Key",
"withAttribute",
"(",
"String",
"attributeName",
",",
"AttributeValue",
"value",
")",
"{",
"if",
"(",
"this",
".",
"attributes",
"==",
"null",
")",
"{",
"this",
".",
"attributes",
"=",
"new",
"HashMap",
"<",
"String",
",",
"AttributeValue",
... | The method set attribute name and attribute value with input parameters for a key.
Returns a reference to this object so that method calls can be chained together.
@param attributeName The attribute name to set for a key.
@param value The attribute value to set for a key.
@return A reference to this object so that met... | [
"The",
"method",
"set",
"attribute",
"name",
"and",
"attribute",
"value",
"with",
"input",
"parameters",
"for",
"a",
"key",
".",
"Returns",
"a",
"reference",
"to",
"this",
"object",
"so",
"that",
"method",
"calls",
"can",
"be",
"chained",
"together",
"."
] | f7140f28dd82121515c88ded7bfe769a37d0ec4a | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/moladb/model/Key.java#L79-L85 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/compiler/VueTemplateCompiler.java | VueTemplateCompiler.initEngine | private void initEngine() {
engine = (NashornScriptEngine) new ScriptEngineManager().getEngineByName("nashorn");
try {
engine.eval("(function(global){global.global = global})(this);");
engine.eval(NashornVueTemplateCompiler.NASHORN_VUE_TEMPLATE_COMPILER);
} catch (ScriptException e) {
e.p... | java | private void initEngine() {
engine = (NashornScriptEngine) new ScriptEngineManager().getEngineByName("nashorn");
try {
engine.eval("(function(global){global.global = global})(this);");
engine.eval(NashornVueTemplateCompiler.NASHORN_VUE_TEMPLATE_COMPILER);
} catch (ScriptException e) {
e.p... | [
"private",
"void",
"initEngine",
"(",
")",
"{",
"engine",
"=",
"(",
"NashornScriptEngine",
")",
"new",
"ScriptEngineManager",
"(",
")",
".",
"getEngineByName",
"(",
"\"nashorn\"",
")",
";",
"try",
"{",
"engine",
".",
"eval",
"(",
"\"(function(global){global.glob... | Init the Nashorn engine and load the Vue compiler in it. | [
"Init",
"the",
"Nashorn",
"engine",
"and",
"load",
"the",
"Vue",
"compiler",
"in",
"it",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/compiler/VueTemplateCompiler.java#L27-L36 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/compiler/VueTemplateCompiler.java | VueTemplateCompiler.compile | public VueTemplateCompilerResult compile(String htmlTemplate)
throws VueTemplateCompilerException {
ScriptObjectMirror templateCompilerResult;
try {
templateCompilerResult =
(ScriptObjectMirror) engine.invokeFunction("compile", htmlTemplate);
} catch (ScriptException | NoSuchMethodExce... | java | public VueTemplateCompilerResult compile(String htmlTemplate)
throws VueTemplateCompilerException {
ScriptObjectMirror templateCompilerResult;
try {
templateCompilerResult =
(ScriptObjectMirror) engine.invokeFunction("compile", htmlTemplate);
} catch (ScriptException | NoSuchMethodExce... | [
"public",
"VueTemplateCompilerResult",
"compile",
"(",
"String",
"htmlTemplate",
")",
"throws",
"VueTemplateCompilerException",
"{",
"ScriptObjectMirror",
"templateCompilerResult",
";",
"try",
"{",
"templateCompilerResult",
"=",
"(",
"ScriptObjectMirror",
")",
"engine",
"."... | Compile the given HTML template to JS functions using vue-template-compiler.
@param htmlTemplate The HTML Component template to compile
@return An object containing the render functions
@throws VueTemplateCompilerException If the compilation fails | [
"Compile",
"the",
"given",
"HTML",
"template",
"to",
"JS",
"functions",
"using",
"vue",
"-",
"template",
"-",
"compiler",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/compiler/VueTemplateCompiler.java#L45-L65 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java | ComponentGeneratorsUtil.isMethodVisibleInTemplate | public static boolean isMethodVisibleInTemplate(ExecutableElement method) {
return isMethodVisibleInJS(method)
&& !hasAnnotation(method, Computed.class)
&& !hasAnnotation(method, Watch.class)
&& !hasAnnotation(method, PropValidator.class)
&& !hasAnnotation(method, PropDefault.class)
... | java | public static boolean isMethodVisibleInTemplate(ExecutableElement method) {
return isMethodVisibleInJS(method)
&& !hasAnnotation(method, Computed.class)
&& !hasAnnotation(method, Watch.class)
&& !hasAnnotation(method, PropValidator.class)
&& !hasAnnotation(method, PropDefault.class)
... | [
"public",
"static",
"boolean",
"isMethodVisibleInTemplate",
"(",
"ExecutableElement",
"method",
")",
"{",
"return",
"isMethodVisibleInJS",
"(",
"method",
")",
"&&",
"!",
"hasAnnotation",
"(",
"method",
",",
"Computed",
".",
"class",
")",
"&&",
"!",
"hasAnnotation"... | Check if a given method is usable in the template
@param method The method we are checking
@return true if visible, false otherwise | [
"Check",
"if",
"a",
"given",
"method",
"is",
"usable",
"in",
"the",
"template"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java#L140-L148 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java | ComponentGeneratorsUtil.getSuperComponentCount | public static int getSuperComponentCount(TypeElement component) {
return getSuperComponentType(component)
.map(superComponent -> getSuperComponentCount(superComponent) + 1)
.orElse(0);
} | java | public static int getSuperComponentCount(TypeElement component) {
return getSuperComponentType(component)
.map(superComponent -> getSuperComponentCount(superComponent) + 1)
.orElse(0);
} | [
"public",
"static",
"int",
"getSuperComponentCount",
"(",
"TypeElement",
"component",
")",
"{",
"return",
"getSuperComponentType",
"(",
"component",
")",
".",
"map",
"(",
"superComponent",
"->",
"getSuperComponentCount",
"(",
"superComponent",
")",
"+",
"1",
")",
... | Return the number of super component in the chain of parents
@param component The {@link IsVueComponent} to count the super type of
@return The number of super components | [
"Return",
"the",
"number",
"of",
"super",
"component",
"in",
"the",
"chain",
"of",
"parents"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java#L202-L206 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java | ComponentGeneratorsUtil.hasTemplate | public static boolean hasTemplate(ProcessingEnvironment processingEnvironment,
TypeElement component) {
Component annotation = component.getAnnotation(Component.class);
if (annotation == null || !annotation.hasTemplate()) {
return false;
}
if (component.getModifiers().contains(Modifier.ABST... | java | public static boolean hasTemplate(ProcessingEnvironment processingEnvironment,
TypeElement component) {
Component annotation = component.getAnnotation(Component.class);
if (annotation == null || !annotation.hasTemplate()) {
return false;
}
if (component.getModifiers().contains(Modifier.ABST... | [
"public",
"static",
"boolean",
"hasTemplate",
"(",
"ProcessingEnvironment",
"processingEnvironment",
",",
"TypeElement",
"component",
")",
"{",
"Component",
"annotation",
"=",
"component",
".",
"getAnnotation",
"(",
"Component",
".",
"class",
")",
";",
"if",
"(",
... | Check if the given Component has a Template. It doesn't have a template if the class is
abstract, if it implements render function or if it has the flag "hasTemplate" to false on the
component annotation.
@param processingEnvironment Environment of the Annotation processor
@param component The component to check
@retu... | [
"Check",
"if",
"the",
"given",
"Component",
"has",
"a",
"Template",
".",
"It",
"doesn",
"t",
"have",
"a",
"template",
"if",
"the",
"class",
"is",
"abstract",
"if",
"it",
"implements",
"render",
"function",
"or",
"if",
"it",
"has",
"the",
"flag",
"hasTemp... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/ComponentGeneratorsUtil.java#L217-L229 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java | TemplateMethodsBuilder.compileTemplateString | private void compileTemplateString(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateParserResult templateParserResult) {
VueTemplateCompilerResult compilerResult;
try {
VueTemplateCompiler vueTemplateCompiler = new VueTemplateCompiler();
compilerResult = vueTemplateCompiler.compile(... | java | private void compileTemplateString(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateParserResult templateParserResult) {
VueTemplateCompilerResult compilerResult;
try {
VueTemplateCompiler vueTemplateCompiler = new VueTemplateCompiler();
compilerResult = vueTemplateCompiler.compile(... | [
"private",
"void",
"compileTemplateString",
"(",
"ComponentExposedTypeGenerator",
"exposedTypeGenerator",
",",
"TemplateParserResult",
"templateParserResult",
")",
"{",
"VueTemplateCompilerResult",
"compilerResult",
";",
"try",
"{",
"VueTemplateCompiler",
"vueTemplateCompiler",
"... | Compile the HTML template and transform it to a JS render function.
@param exposedTypeGenerator Class generating the ExposedType
@param templateParserResult The result of the HTML template parsed by {@link TemplateParser} | [
"Compile",
"the",
"HTML",
"template",
"and",
"transform",
"it",
"to",
"a",
"JS",
"render",
"function",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java#L51-L64 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java | TemplateMethodsBuilder.generateGetRenderFunction | private void generateGetRenderFunction(ComponentExposedTypeGenerator exposedTypeGenerator,
VueTemplateCompilerResult result,
TemplateParserResult templateParserResult) {
MethodSpec.Builder getRenderFunctionBuilder = MethodSpec
.methodBuilder("getRenderFunction")
.addModifiers(Modifier.PR... | java | private void generateGetRenderFunction(ComponentExposedTypeGenerator exposedTypeGenerator,
VueTemplateCompilerResult result,
TemplateParserResult templateParserResult) {
MethodSpec.Builder getRenderFunctionBuilder = MethodSpec
.methodBuilder("getRenderFunction")
.addModifiers(Modifier.PR... | [
"private",
"void",
"generateGetRenderFunction",
"(",
"ComponentExposedTypeGenerator",
"exposedTypeGenerator",
",",
"VueTemplateCompilerResult",
"result",
",",
"TemplateParserResult",
"templateParserResult",
")",
"{",
"MethodSpec",
".",
"Builder",
"getRenderFunctionBuilder",
"=",
... | Generate the method that returns the body of the render function.
@param exposedTypeGenerator Class generating the ExposedType
@param result The result from compilation using vue-template-compiler
@param templateParserResult The result of the HTML template parsed by {@link TemplateParser} | [
"Generate",
"the",
"method",
"that",
"returns",
"the",
"body",
"of",
"the",
"render",
"function",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java#L73-L103 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java | TemplateMethodsBuilder.generateGetStaticRenderFunctions | private void generateGetStaticRenderFunctions(ComponentExposedTypeGenerator exposedTypeGenerator,
VueTemplateCompilerResult result) {
CodeBlock.Builder staticFunctions = CodeBlock.builder();
boolean isFirst = true;
for (String staticRenderFunction : result.getStaticRenderFunctions()) {
if (!isF... | java | private void generateGetStaticRenderFunctions(ComponentExposedTypeGenerator exposedTypeGenerator,
VueTemplateCompilerResult result) {
CodeBlock.Builder staticFunctions = CodeBlock.builder();
boolean isFirst = true;
for (String staticRenderFunction : result.getStaticRenderFunctions()) {
if (!isF... | [
"private",
"void",
"generateGetStaticRenderFunctions",
"(",
"ComponentExposedTypeGenerator",
"exposedTypeGenerator",
",",
"VueTemplateCompilerResult",
"result",
")",
"{",
"CodeBlock",
".",
"Builder",
"staticFunctions",
"=",
"CodeBlock",
".",
"builder",
"(",
")",
";",
"boo... | Generate the method that returns the body of the static render functions.
@param exposedTypeGenerator Class generating the ExposedType
@param result The result from compilation using vue-template-compiler | [
"Generate",
"the",
"method",
"that",
"returns",
"the",
"body",
"of",
"the",
"static",
"render",
"functions",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java#L111-L133 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java | TemplateMethodsBuilder.processTemplateExpressions | private void processTemplateExpressions(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateParserResult templateParserResult) {
for (TemplateExpression expression : templateParserResult.getExpressions()) {
generateTemplateExpressionMethod(exposedTypeGenerator,
expression,
te... | java | private void processTemplateExpressions(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateParserResult templateParserResult) {
for (TemplateExpression expression : templateParserResult.getExpressions()) {
generateTemplateExpressionMethod(exposedTypeGenerator,
expression,
te... | [
"private",
"void",
"processTemplateExpressions",
"(",
"ComponentExposedTypeGenerator",
"exposedTypeGenerator",
",",
"TemplateParserResult",
"templateParserResult",
")",
"{",
"for",
"(",
"TemplateExpression",
"expression",
":",
"templateParserResult",
".",
"getExpressions",
"(",... | Process the expressions found in the HTML template
@param exposedTypeGenerator Class generating the ExposedType
@param templateParserResult Result from the parsing of the HTML Template | [
"Process",
"the",
"expressions",
"found",
"in",
"the",
"HTML",
"template"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java#L141-L157 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java | TemplateMethodsBuilder.generateTemplateExpressionMethod | private void generateTemplateExpressionMethod(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateExpression expression,
String templateName) {
MethodSpec.Builder templateExpressionMethodBuilder = MethodSpec
.methodBuilder(expression.getId())
.addModifiers(Modifier.PUBLIC)
... | java | private void generateTemplateExpressionMethod(ComponentExposedTypeGenerator exposedTypeGenerator,
TemplateExpression expression,
String templateName) {
MethodSpec.Builder templateExpressionMethodBuilder = MethodSpec
.methodBuilder(expression.getId())
.addModifiers(Modifier.PUBLIC)
... | [
"private",
"void",
"generateTemplateExpressionMethod",
"(",
"ComponentExposedTypeGenerator",
"exposedTypeGenerator",
",",
"TemplateExpression",
"expression",
",",
"String",
"templateName",
")",
"{",
"MethodSpec",
".",
"Builder",
"templateExpressionMethodBuilder",
"=",
"MethodSp... | Generate the Java method for an expression in the Template
@param exposedTypeGenerator Class generating the ExposedType
@param templateName The name of the Template the expression is from | [
"Generate",
"the",
"Java",
"method",
"for",
"an",
"expression",
"in",
"the",
"Template"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/builder/TemplateMethodsBuilder.java#L165-L207 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/GeneratorsNameUtil.java | GeneratorsNameUtil.componentToTagName | public static String componentToTagName(Element componentElement)
throws MissingComponentAnnotationException {
Component componentAnnotation = componentElement.getAnnotation(Component.class);
JsComponent jsComponentAnnotation = componentElement.getAnnotation(JsComponent.class);
String annotationNameV... | java | public static String componentToTagName(Element componentElement)
throws MissingComponentAnnotationException {
Component componentAnnotation = componentElement.getAnnotation(Component.class);
JsComponent jsComponentAnnotation = componentElement.getAnnotation(JsComponent.class);
String annotationNameV... | [
"public",
"static",
"String",
"componentToTagName",
"(",
"Element",
"componentElement",
")",
"throws",
"MissingComponentAnnotationException",
"{",
"Component",
"componentAnnotation",
"=",
"componentElement",
".",
"getAnnotation",
"(",
"Component",
".",
"class",
")",
";",
... | Return the default name to register a component based on it's class name. The name of the tag
is the name of the component converted to kebab-case. If the component class ends with
"Component", this part is ignored.
@param componentElement The Element for the {@link IsVueComponent} we want the name of
@return The name... | [
"Return",
"the",
"default",
"name",
"to",
"register",
"a",
"component",
"based",
"on",
"it",
"s",
"class",
"name",
".",
"The",
"name",
"of",
"the",
"tag",
"is",
"the",
"name",
"of",
"the",
"component",
"converted",
"to",
"kebab",
"-",
"case",
".",
"If"... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/GeneratorsNameUtil.java#L114-L140 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/GeneratorsNameUtil.java | GeneratorsNameUtil.directiveToTagName | public static String directiveToTagName(String directiveClassName) {
// Drop "Component" at the end of the class name
directiveClassName = directiveClassName.replaceAll("Directive$", "");
// Convert from CamelCase to kebab-case
return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, directiveClassName... | java | public static String directiveToTagName(String directiveClassName) {
// Drop "Component" at the end of the class name
directiveClassName = directiveClassName.replaceAll("Directive$", "");
// Convert from CamelCase to kebab-case
return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_HYPHEN, directiveClassName... | [
"public",
"static",
"String",
"directiveToTagName",
"(",
"String",
"directiveClassName",
")",
"{",
"// Drop \"Component\" at the end of the class name",
"directiveClassName",
"=",
"directiveClassName",
".",
"replaceAll",
"(",
"\"Directive$\"",
",",
"\"\"",
")",
";",
"// Con... | Return the default name to register a directive based on it's class name The name of the tag is
the name of the component converted to kebab-case If the component class ends with "Directive",
this part is ignored
@param directiveClassName The class name of the {@link VueDirective}
@return The name of the directive as ... | [
"Return",
"the",
"default",
"name",
"to",
"register",
"a",
"directive",
"based",
"on",
"it",
"s",
"class",
"name",
"The",
"name",
"of",
"the",
"tag",
"is",
"the",
"name",
"of",
"the",
"component",
"converted",
"to",
"kebab",
"-",
"case",
"If",
"the",
"... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/GeneratorsNameUtil.java#L150-L155 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java | VForDefinition.initLoopVariable | private void initLoopVariable(String type, String name, TemplateParserContext context) {
this.loopVariableInfo =
context.addLocalVariable(context.getFullyQualifiedNameForClassName(type.trim()),
name.trim());
} | java | private void initLoopVariable(String type, String name, TemplateParserContext context) {
this.loopVariableInfo =
context.addLocalVariable(context.getFullyQualifiedNameForClassName(type.trim()),
name.trim());
} | [
"private",
"void",
"initLoopVariable",
"(",
"String",
"type",
",",
"String",
"name",
",",
"TemplateParserContext",
"context",
")",
"{",
"this",
".",
"loopVariableInfo",
"=",
"context",
".",
"addLocalVariable",
"(",
"context",
".",
"getFullyQualifiedNameForClassName",
... | Init the loop variable and add it to the parser context
@param type Java type of the variable, will look for qualified class name in the context
@param name Name of the variable
@param context Context of the template parser | [
"Init",
"the",
"loop",
"variable",
"and",
"add",
"it",
"to",
"the",
"parser",
"context"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java#L157-L161 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java | VForDefinition.initIndexVariable | private void initIndexVariable(String name, TemplateParserContext context) {
this.indexVariableInfo = context.addLocalVariable("int", name.trim());
} | java | private void initIndexVariable(String name, TemplateParserContext context) {
this.indexVariableInfo = context.addLocalVariable("int", name.trim());
} | [
"private",
"void",
"initIndexVariable",
"(",
"String",
"name",
",",
"TemplateParserContext",
"context",
")",
"{",
"this",
".",
"indexVariableInfo",
"=",
"context",
".",
"addLocalVariable",
"(",
"\"int\"",
",",
"name",
".",
"trim",
"(",
")",
")",
";",
"}"
] | Init the index variable and add it to the parser context
@param name Name of the variable
@param context Context of the template parser | [
"Init",
"the",
"index",
"variable",
"and",
"add",
"it",
"to",
"the",
"parser",
"context"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java#L169-L171 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java | VForDefinition.initKeyVariable | private void initKeyVariable(String name, TemplateParserContext context) {
this.keyVariableInfo = context.addLocalVariable("String", name.trim());
} | java | private void initKeyVariable(String name, TemplateParserContext context) {
this.keyVariableInfo = context.addLocalVariable("String", name.trim());
} | [
"private",
"void",
"initKeyVariable",
"(",
"String",
"name",
",",
"TemplateParserContext",
"context",
")",
"{",
"this",
".",
"keyVariableInfo",
"=",
"context",
".",
"addLocalVariable",
"(",
"\"String\"",
",",
"name",
".",
"trim",
"(",
")",
")",
";",
"}"
] | Init the key variable and add it to the parser context
@param name Name of the variable
@param context Context of the template parser | [
"Init",
"the",
"key",
"variable",
"and",
"add",
"it",
"to",
"the",
"parser",
"context"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/VForDefinition.java#L179-L181 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateExpression.java | TemplateExpression.toTemplateString | public String toTemplateString() {
String[] parametersName =
this.parameters.stream().map(VariableInfo::getName).toArray(String[]::new);
return this.getId() + "(" + String.join(", ", parametersName) + ")";
} | java | public String toTemplateString() {
String[] parametersName =
this.parameters.stream().map(VariableInfo::getName).toArray(String[]::new);
return this.getId() + "(" + String.join(", ", parametersName) + ")";
} | [
"public",
"String",
"toTemplateString",
"(",
")",
"{",
"String",
"[",
"]",
"parametersName",
"=",
"this",
".",
"parameters",
".",
"stream",
"(",
")",
".",
"map",
"(",
"VariableInfo",
"::",
"getName",
")",
".",
"toArray",
"(",
"String",
"[",
"]",
"::",
... | Return this expression as a string that can be placed in the template as a replacement of the
Java expression.
@return An expression that can be interpreted by Vue.js | [
"Return",
"this",
"expression",
"as",
"a",
"string",
"that",
"can",
"be",
"placed",
"in",
"the",
"template",
"as",
"a",
"replacement",
"of",
"the",
"Java",
"expression",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateExpression.java#L93-L98 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.parseHtmlTemplate | public TemplateParserResult parseHtmlTemplate(String htmlTemplate,
TemplateParserContext context, Elements elements, Messager messager, URI htmlTemplateUri) {
this.context = context;
this.elements = elements;
this.messager = messager;
this.logger = new TemplateParserLogger(context, messager);
... | java | public TemplateParserResult parseHtmlTemplate(String htmlTemplate,
TemplateParserContext context, Elements elements, Messager messager, URI htmlTemplateUri) {
this.context = context;
this.elements = elements;
this.messager = messager;
this.logger = new TemplateParserLogger(context, messager);
... | [
"public",
"TemplateParserResult",
"parseHtmlTemplate",
"(",
"String",
"htmlTemplate",
",",
"TemplateParserContext",
"context",
",",
"Elements",
"elements",
",",
"Messager",
"messager",
",",
"URI",
"htmlTemplateUri",
")",
"{",
"this",
".",
"context",
"=",
"context",
... | Parse a given HTML template and return the a result object containing the expressions and a
transformed HTML.
@param htmlTemplate The HTML template to process, as a String
@param context Context of the Component we are currently processing
@param messager Used to report errors in template during Annotation Processing
... | [
"Parse",
"a",
"given",
"HTML",
"template",
"and",
"return",
"the",
"a",
"result",
"object",
"containing",
"the",
"expressions",
"and",
"a",
"transformed",
"HTML",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L101-L121 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processImports | private void processImports(Source doc) {
doc
.getAllElements()
.stream()
.filter(element -> "vue-gwt:import".equalsIgnoreCase(element.getName()))
.peek(importElement -> {
String classAttributeValue = importElement.getAttributeValue("class");
if (classAttributeVal... | java | private void processImports(Source doc) {
doc
.getAllElements()
.stream()
.filter(element -> "vue-gwt:import".equalsIgnoreCase(element.getName()))
.peek(importElement -> {
String classAttributeValue = importElement.getAttributeValue("class");
if (classAttributeVal... | [
"private",
"void",
"processImports",
"(",
"Source",
"doc",
")",
"{",
"doc",
".",
"getAllElements",
"(",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"element",
"->",
"\"vue-gwt:import\"",
".",
"equalsIgnoreCase",
"(",
"element",
".",
"getName",
"(",
"... | Add java imports in the template to the context.
@param doc The document to process | [
"Add",
"java",
"imports",
"in",
"the",
"template",
"to",
"the",
"context",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L137-L154 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processElement | private void processElement(Element element) {
context.setCurrentSegment(element);
currentProp = null;
currentAttribute = null;
// Process attributes
boolean shouldPopContext = processElementAttributes(element);
// Process text segments
StreamSupport
.stream(((Iterable<Segment>) el... | java | private void processElement(Element element) {
context.setCurrentSegment(element);
currentProp = null;
currentAttribute = null;
// Process attributes
boolean shouldPopContext = processElementAttributes(element);
// Process text segments
StreamSupport
.stream(((Iterable<Segment>) el... | [
"private",
"void",
"processElement",
"(",
"Element",
"element",
")",
"{",
"context",
".",
"setCurrentSegment",
"(",
"element",
")",
";",
"currentProp",
"=",
"null",
";",
"currentAttribute",
"=",
"null",
";",
"// Process attributes",
"boolean",
"shouldPopContext",
... | Recursive method that will process the whole template DOM tree.
@param element Current element being processed | [
"Recursive",
"method",
"that",
"will",
"process",
"the",
"whole",
"template",
"DOM",
"tree",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L206-L237 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.getTypeFromDOMElement | private TypeMirror getTypeFromDOMElement(Element element) {
return DOMElementsUtil
.getTypeForElementTag(element.getStartTag().getName())
.map(Class::getCanonicalName)
.map(elements::getTypeElement)
.map(TypeElement::asType)
.orElse(null);
} | java | private TypeMirror getTypeFromDOMElement(Element element) {
return DOMElementsUtil
.getTypeForElementTag(element.getStartTag().getName())
.map(Class::getCanonicalName)
.map(elements::getTypeElement)
.map(TypeElement::asType)
.orElse(null);
} | [
"private",
"TypeMirror",
"getTypeFromDOMElement",
"(",
"Element",
"element",
")",
"{",
"return",
"DOMElementsUtil",
".",
"getTypeForElementTag",
"(",
"element",
".",
"getStartTag",
"(",
")",
".",
"getName",
"(",
")",
")",
".",
"map",
"(",
"Class",
"::",
"getCa... | Find the corresponding TypeMirror from Elemental2 for a given DOM Element
@param element The element we want the TypeMirror of
@return The type mirror | [
"Find",
"the",
"corresponding",
"TypeMirror",
"from",
"Elemental2",
"for",
"a",
"given",
"DOM",
"Element"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L333-L340 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.registerMandatoryAttributes | private void registerMandatoryAttributes(Attributes attributes) {
// see https://sourceforge.net/p/jerichohtml/discussion/350024/thread/501a7d05/
Map<String, String> attrs = context.getMandatoryAttributes();
if (!attrs.isEmpty()) {
for (Entry<String, String> i : attrs.entrySet()) {
String v = ... | java | private void registerMandatoryAttributes(Attributes attributes) {
// see https://sourceforge.net/p/jerichohtml/discussion/350024/thread/501a7d05/
Map<String, String> attrs = context.getMandatoryAttributes();
if (!attrs.isEmpty()) {
for (Entry<String, String> i : attrs.entrySet()) {
String v = ... | [
"private",
"void",
"registerMandatoryAttributes",
"(",
"Attributes",
"attributes",
")",
"{",
"// see https://sourceforge.net/p/jerichohtml/discussion/350024/thread/501a7d05/",
"Map",
"<",
"String",
",",
"String",
">",
"attrs",
"=",
"context",
".",
"getMandatoryAttributes",
"(... | Register mandatory attributes for Scoped CSS | [
"Register",
"mandatory",
"attributes",
"for",
"Scoped",
"CSS"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L351-L364 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.getExpressionReturnTypeForAttribute | private TypeName getExpressionReturnTypeForAttribute(Attribute attribute,
Map<String, Class<?>> propertiesTypes) {
String attributeName = attribute.getKey().toLowerCase();
if (attributeName.indexOf("@") == 0 || attributeName.indexOf("v-on:") == 0) {
return TypeName.VOID;
}
if ("v-if".equal... | java | private TypeName getExpressionReturnTypeForAttribute(Attribute attribute,
Map<String, Class<?>> propertiesTypes) {
String attributeName = attribute.getKey().toLowerCase();
if (attributeName.indexOf("@") == 0 || attributeName.indexOf("v-on:") == 0) {
return TypeName.VOID;
}
if ("v-if".equal... | [
"private",
"TypeName",
"getExpressionReturnTypeForAttribute",
"(",
"Attribute",
"attribute",
",",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"propertiesTypes",
")",
"{",
"String",
"attributeName",
"=",
"attribute",
".",
"getKey",
"(",
")",
".",
"t... | Guess the type of the expression based on where it is used. The guessed type can be overridden
by adding a Cast to the desired type at the beginning of the expression.
@param attribute The attribute the expression is in | [
"Guess",
"the",
"type",
"of",
"the",
"expression",
"based",
"on",
"where",
"it",
"is",
"used",
".",
"The",
"guessed",
"type",
"can",
"be",
"overridden",
"by",
"adding",
"a",
"Cast",
"to",
"the",
"desired",
"type",
"at",
"the",
"beginning",
"of",
"the",
... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L485-L514 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processVForValue | private String processVForValue(String vForValue) {
VForDefinition vForDef = new VForDefinition(vForValue, context, logger);
// Set return of the "in" expression
currentExpressionReturnType = vForDef.getInExpressionType();
String inExpression = this.processExpression(vForDef.getInExpression());
/... | java | private String processVForValue(String vForValue) {
VForDefinition vForDef = new VForDefinition(vForValue, context, logger);
// Set return of the "in" expression
currentExpressionReturnType = vForDef.getInExpressionType();
String inExpression = this.processExpression(vForDef.getInExpression());
/... | [
"private",
"String",
"processVForValue",
"(",
"String",
"vForValue",
")",
"{",
"VForDefinition",
"vForDef",
"=",
"new",
"VForDefinition",
"(",
"vForValue",
",",
"context",
",",
"logger",
")",
";",
"// Set return of the \"in\" expression",
"currentExpressionReturnType",
... | Process a v-for value. It will register the loop variables as a local variable in the context
stack.
@param vForValue The value of the v-for attribute
@return A processed v-for value, should be placed in the HTML in place of the original v-for
value | [
"Process",
"a",
"v",
"-",
"for",
"value",
".",
"It",
"will",
"register",
"the",
"loop",
"variables",
"as",
"a",
"local",
"variable",
"in",
"the",
"context",
"stack",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L524-L534 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processSlotScopeValue | private String processSlotScopeValue(String value) {
SlotScopeDefinition slotScopeDefinition = new SlotScopeDefinition(value, context, logger);
return slotScopeDefinition.getSlotScopeVariableName();
} | java | private String processSlotScopeValue(String value) {
SlotScopeDefinition slotScopeDefinition = new SlotScopeDefinition(value, context, logger);
return slotScopeDefinition.getSlotScopeVariableName();
} | [
"private",
"String",
"processSlotScopeValue",
"(",
"String",
"value",
")",
"{",
"SlotScopeDefinition",
"slotScopeDefinition",
"=",
"new",
"SlotScopeDefinition",
"(",
"value",
",",
"context",
",",
"logger",
")",
";",
"return",
"slotScopeDefinition",
".",
"getSlotScopeV... | Process a scoped-slot value. | [
"Process",
"a",
"scoped",
"-",
"slot",
"value",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L539-L542 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processExpression | private String processExpression(String expressionString) {
expressionString = expressionString == null ? "" : expressionString.trim();
if (expressionString.isEmpty()) {
if (isAttributeBinding(currentAttribute)) {
logger.error(
"Empty expression in template property binding. If you wan... | java | private String processExpression(String expressionString) {
expressionString = expressionString == null ? "" : expressionString.trim();
if (expressionString.isEmpty()) {
if (isAttributeBinding(currentAttribute)) {
logger.error(
"Empty expression in template property binding. If you wan... | [
"private",
"String",
"processExpression",
"(",
"String",
"expressionString",
")",
"{",
"expressionString",
"=",
"expressionString",
"==",
"null",
"?",
"\"\"",
":",
"expressionString",
".",
"trim",
"(",
")",
";",
"if",
"(",
"expressionString",
".",
"isEmpty",
"("... | Process a given template expression
@param expressionString Should be either empty or a valid Java expression
@return The processed expression | [
"Process",
"a",
"given",
"template",
"expression"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L550-L582 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.shouldSkipExpressionProcessing | private boolean shouldSkipExpressionProcessing(String expressionString) {
// We don't skip if it's a component prop as we want Java validation
// We don't optimize String expression, as we want GWT to convert Java values
// to String for us (Enums, wrapped primitives...)
return currentProp == null && !S... | java | private boolean shouldSkipExpressionProcessing(String expressionString) {
// We don't skip if it's a component prop as we want Java validation
// We don't optimize String expression, as we want GWT to convert Java values
// to String for us (Enums, wrapped primitives...)
return currentProp == null && !S... | [
"private",
"boolean",
"shouldSkipExpressionProcessing",
"(",
"String",
"expressionString",
")",
"{",
"// We don't skip if it's a component prop as we want Java validation",
"// We don't optimize String expression, as we want GWT to convert Java values",
"// to String for us (Enums, wrapped primi... | In some cases we want to skip expression processing for optimization. This is when we are sure
the expression is valid and there is no need to create a Java method for it.
@param expressionString The expression to asses
@return true if we can skip the expression | [
"In",
"some",
"cases",
"we",
"want",
"to",
"skip",
"expression",
"processing",
"for",
"optimization",
".",
"This",
"is",
"when",
"we",
"are",
"sure",
"the",
"expression",
"is",
"valid",
"and",
"there",
"is",
"no",
"need",
"to",
"create",
"a",
"Java",
"me... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L591-L599 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.processJavaExpression | private TemplateExpression processJavaExpression(String expressionString) {
Expression expression;
try {
expression = JavaParser.parseExpression(expressionString);
} catch (ParseProblemException parseException) {
logger.error("Couldn't parse Expression, make sure it is valid Java.",
ex... | java | private TemplateExpression processJavaExpression(String expressionString) {
Expression expression;
try {
expression = JavaParser.parseExpression(expressionString);
} catch (ParseProblemException parseException) {
logger.error("Couldn't parse Expression, make sure it is valid Java.",
ex... | [
"private",
"TemplateExpression",
"processJavaExpression",
"(",
"String",
"expressionString",
")",
"{",
"Expression",
"expression",
";",
"try",
"{",
"expression",
"=",
"JavaParser",
".",
"parseExpression",
"(",
"expressionString",
")",
";",
"}",
"catch",
"(",
"ParseP... | Process the given string as a Java expression.
@param expressionString A valid Java expression
@return A processed expression, should be placed in the HTML in place of the original
expression | [
"Process",
"the",
"given",
"string",
"as",
"a",
"Java",
"expression",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L635-L667 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.resolveTypesUsingImports | private void resolveTypesUsingImports(Expression expression) {
if (expression instanceof NodeWithType) {
NodeWithType<?, ?> nodeWithType = ((NodeWithType<?, ?>) expression);
nodeWithType.setType(getQualifiedName(nodeWithType.getType()));
}
// Recurse downward in the expression
expression
... | java | private void resolveTypesUsingImports(Expression expression) {
if (expression instanceof NodeWithType) {
NodeWithType<?, ?> nodeWithType = ((NodeWithType<?, ?>) expression);
nodeWithType.setType(getQualifiedName(nodeWithType.getType()));
}
// Recurse downward in the expression
expression
... | [
"private",
"void",
"resolveTypesUsingImports",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"NodeWithType",
")",
"{",
"NodeWithType",
"<",
"?",
",",
"?",
">",
"nodeWithType",
"=",
"(",
"(",
"NodeWithType",
"<",
"?",
",",
... | Resolve all the types in the expression. This will replace the Class with the full qualified
name using the template imports.
@param expression A Java expression from the Template | [
"Resolve",
"all",
"the",
"types",
"in",
"the",
"expression",
".",
"This",
"will",
"replace",
"the",
"Class",
"with",
"the",
"full",
"qualified",
"name",
"using",
"the",
"template",
"imports",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L708-L721 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.resolveStaticMethodsUsingImports | private void resolveStaticMethodsUsingImports(Expression expression) {
if (expression instanceof MethodCallExpr) {
MethodCallExpr methodCall = ((MethodCallExpr) expression);
String methodName = methodCall.getName().getIdentifier();
if (!methodCall.getScope().isPresent() && context.hasStaticMethod(... | java | private void resolveStaticMethodsUsingImports(Expression expression) {
if (expression instanceof MethodCallExpr) {
MethodCallExpr methodCall = ((MethodCallExpr) expression);
String methodName = methodCall.getName().getIdentifier();
if (!methodCall.getScope().isPresent() && context.hasStaticMethod(... | [
"private",
"void",
"resolveStaticMethodsUsingImports",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"MethodCallExpr",
")",
"{",
"MethodCallExpr",
"methodCall",
"=",
"(",
"(",
"MethodCallExpr",
")",
"expression",
")",
";",
"String... | Resolve static method calls using static imports
@param expression The expression to resolve | [
"Resolve",
"static",
"method",
"calls",
"using",
"static",
"imports"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L728-L744 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java | TemplateParser.checkMethodNames | private void checkMethodNames(Expression expression) {
if (expression instanceof MethodCallExpr) {
MethodCallExpr methodCall = ((MethodCallExpr) expression);
if (!methodCall.getScope().isPresent()) {
String methodName = methodCall.getName().getIdentifier();
if (!context.hasMethod(methodN... | java | private void checkMethodNames(Expression expression) {
if (expression instanceof MethodCallExpr) {
MethodCallExpr methodCall = ((MethodCallExpr) expression);
if (!methodCall.getScope().isPresent()) {
String methodName = methodCall.getName().getIdentifier();
if (!context.hasMethod(methodN... | [
"private",
"void",
"checkMethodNames",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"instanceof",
"MethodCallExpr",
")",
"{",
"MethodCallExpr",
"methodCall",
"=",
"(",
"(",
"MethodCallExpr",
")",
"expression",
")",
";",
"if",
"(",
"!",
"... | Check the expression for component method calls. This will check that the methods used in the
template exist in the Component. It throws an exception if we use a method that is not declared
in our Component. This will not check for the type or number of parameters, we leave that to
the Java Compiler.
@param expression... | [
"Check",
"the",
"expression",
"for",
"component",
"method",
"calls",
".",
"This",
"will",
"check",
"that",
"the",
"methods",
"used",
"in",
"the",
"template",
"exist",
"in",
"the",
"Component",
".",
"It",
"throws",
"an",
"exception",
"if",
"we",
"use",
"a",... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L754-L776 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/factory/AbstractVueComponentFactoryGenerator.java | AbstractVueComponentFactoryGenerator.createStaticGetMethod | private void createStaticGetMethod(TypeElement component, ClassName vueFactoryClassName,
Builder vueFactoryBuilder, List<CodeBlock> staticInitParameters) {
MethodSpec.Builder getBuilder = MethodSpec
.methodBuilder("get")
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
.returns(vueFacto... | java | private void createStaticGetMethod(TypeElement component, ClassName vueFactoryClassName,
Builder vueFactoryBuilder, List<CodeBlock> staticInitParameters) {
MethodSpec.Builder getBuilder = MethodSpec
.methodBuilder("get")
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
.returns(vueFacto... | [
"private",
"void",
"createStaticGetMethod",
"(",
"TypeElement",
"component",
",",
"ClassName",
"vueFactoryClassName",
",",
"Builder",
"vueFactoryBuilder",
",",
"List",
"<",
"CodeBlock",
">",
"staticInitParameters",
")",
"{",
"MethodSpec",
".",
"Builder",
"getBuilder",
... | Create a static get method that can be used to retrieve an instance of our Factory. Factory
retrieved using this method do NOT support injection.
@param component The Component we generate for
@param vueFactoryClassName The type name of our generated {@link VueComponentFactory}
@param vueFactoryBuilder The builder to ... | [
"Create",
"a",
"static",
"get",
"method",
"that",
"can",
"be",
"used",
"to",
"retrieve",
"an",
"instance",
"of",
"our",
"Factory",
".",
"Factory",
"retrieved",
"using",
"this",
"method",
"do",
"NOT",
"support",
"injection",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/factory/AbstractVueComponentFactoryGenerator.java#L164-L197 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateParserResult.java | TemplateParserResult.addExpression | public TemplateExpression addExpression(String expression, TypeName expressionType,
boolean shouldCast, List<VariableInfo> parameters) {
String id = "exp$" + this.expressions.size();
TemplateExpression templateExpression = new TemplateExpression(id,
expression.trim(),
expressionType,
... | java | public TemplateExpression addExpression(String expression, TypeName expressionType,
boolean shouldCast, List<VariableInfo> parameters) {
String id = "exp$" + this.expressions.size();
TemplateExpression templateExpression = new TemplateExpression(id,
expression.trim(),
expressionType,
... | [
"public",
"TemplateExpression",
"addExpression",
"(",
"String",
"expression",
",",
"TypeName",
"expressionType",
",",
"boolean",
"shouldCast",
",",
"List",
"<",
"VariableInfo",
">",
"parameters",
")",
"{",
"String",
"id",
"=",
"\"exp$\"",
"+",
"this",
".",
"expr... | Add an expression to the result. All the Java methods from the template will be added here so
we can add them to our Vue.js component.
@param expression The Java expression
@param expressionType The type of the expression, determined depending on the context it is
used in.
@param shouldCast Should the expression be ca... | [
"Add",
"an",
"expression",
"to",
"the",
"result",
".",
"All",
"the",
"Java",
"methods",
"from",
"the",
"template",
"will",
"be",
"added",
"here",
"so",
"we",
"can",
"add",
"them",
"to",
"our",
"Vue",
".",
"js",
"component",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateParserResult.java#L68-L81 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateParserResult.java | TemplateParserResult.addRef | public void addRef(String name, TypeMirror elementType, boolean isArray) {
refs.add(new RefInfo(name, elementType, isArray));
} | java | public void addRef(String name, TypeMirror elementType, boolean isArray) {
refs.add(new RefInfo(name, elementType, isArray));
} | [
"public",
"void",
"addRef",
"(",
"String",
"name",
",",
"TypeMirror",
"elementType",
",",
"boolean",
"isArray",
")",
"{",
"refs",
".",
"add",
"(",
"new",
"RefInfo",
"(",
"name",
",",
"elementType",
",",
"isArray",
")",
")",
";",
"}"
] | Register a ref found in the template
@param name The name of the ref
@param elementType The type of the element the Ref is on
@param isArray Whether the ref is in a v-for (should be an array) | [
"Register",
"a",
"ref",
"found",
"in",
"the",
"template"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/result/TemplateParserResult.java#L97-L99 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/tools/VueGWTTools.java | VueGWTTools.escapeStringForJsRegexp | public static String escapeStringForJsRegexp(String input) {
JsString string = uncheckedCast(input);
return string.replace(ESCAPE_JS_STRING_REGEXP, "\\$&");
} | java | public static String escapeStringForJsRegexp(String input) {
JsString string = uncheckedCast(input);
return string.replace(ESCAPE_JS_STRING_REGEXP, "\\$&");
} | [
"public",
"static",
"String",
"escapeStringForJsRegexp",
"(",
"String",
"input",
")",
"{",
"JsString",
"string",
"=",
"uncheckedCast",
"(",
"input",
")",
";",
"return",
"string",
".",
"replace",
"(",
"ESCAPE_JS_STRING_REGEXP",
",",
"\"\\\\$&\"",
")",
";",
"}"
] | Escape a String to be used in a JsRegexp as a String literal
@param input The String we want to escape
@return The escaped String | [
"Escape",
"a",
"String",
"to",
"be",
"used",
"in",
"a",
"JsRegexp",
"as",
"a",
"String",
"literal"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/tools/VueGWTTools.java#L218-L221 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/factory/VueComponentFactoryGenerator.java | VueComponentFactoryGenerator.registerLocalDirectives | private void registerLocalDirectives(Component annotation, MethodSpec.Builder initBuilder) {
try {
Class<?>[] componentsClass = annotation.directives();
if (componentsClass.length > 0) {
addGetDirectivesStatement(initBuilder);
}
Stream
.of(componentsClass)
.forE... | java | private void registerLocalDirectives(Component annotation, MethodSpec.Builder initBuilder) {
try {
Class<?>[] componentsClass = annotation.directives();
if (componentsClass.length > 0) {
addGetDirectivesStatement(initBuilder);
}
Stream
.of(componentsClass)
.forE... | [
"private",
"void",
"registerLocalDirectives",
"(",
"Component",
"annotation",
",",
"MethodSpec",
".",
"Builder",
"initBuilder",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"[",
"]",
"componentsClass",
"=",
"annotation",
".",
"directives",
"(",
")",
";",
"i... | Register directives passed to the annotation.
@param annotation The Component annotation on the Component we generate for
@param initBuilder The builder for the init method | [
"Register",
"directives",
"passed",
"to",
"the",
"annotation",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/factory/VueComponentFactoryGenerator.java#L179-L206 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java | VueComponentOptions.initRenderFunctions | @JsOverlay
public final void initRenderFunctions(Function renderFunctionString,
Function[] staticRenderFnsStrings) {
this.setRender(renderFunctionString);
this.setStaticRenderFns(cast(staticRenderFnsStrings));
} | java | @JsOverlay
public final void initRenderFunctions(Function renderFunctionString,
Function[] staticRenderFnsStrings) {
this.setRender(renderFunctionString);
this.setStaticRenderFns(cast(staticRenderFnsStrings));
} | [
"@",
"JsOverlay",
"public",
"final",
"void",
"initRenderFunctions",
"(",
"Function",
"renderFunctionString",
",",
"Function",
"[",
"]",
"staticRenderFnsStrings",
")",
"{",
"this",
".",
"setRender",
"(",
"renderFunctionString",
")",
";",
"this",
".",
"setStaticRender... | Initialise the render functions from our template.
@param renderFunctionString The render function
@param staticRenderFnsStrings The static render functions | [
"Initialise",
"the",
"render",
"functions",
"from",
"our",
"template",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L68-L73 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java | VueComponentOptions.initData | @JsOverlay
public final void initData(boolean useFactory, Set<String> fieldNames) {
JsPropertyMap<Object> dataFields = JsPropertyMap.of();
dataFieldsToProxy = new HashSet<>();
for (String fieldName : fieldNames) {
dataFields.set(fieldName, null);
// If field name starts with $ or _ Vue.js won... | java | @JsOverlay
public final void initData(boolean useFactory, Set<String> fieldNames) {
JsPropertyMap<Object> dataFields = JsPropertyMap.of();
dataFieldsToProxy = new HashSet<>();
for (String fieldName : fieldNames) {
dataFields.set(fieldName, null);
// If field name starts with $ or _ Vue.js won... | [
"@",
"JsOverlay",
"public",
"final",
"void",
"initData",
"(",
"boolean",
"useFactory",
",",
"Set",
"<",
"String",
">",
"fieldNames",
")",
"{",
"JsPropertyMap",
"<",
"Object",
">",
"dataFields",
"=",
"JsPropertyMap",
".",
"of",
"(",
")",
";",
"dataFieldsToPro... | Initialise the data structure, then set it to either a Factory or directly on the Component.
@param useFactory Boolean representing whether or not to use a Factory.
@param fieldNames Name of the data fields in the object | [
"Initialise",
"the",
"data",
"structure",
"then",
"set",
"it",
"to",
"either",
"a",
"Factory",
"or",
"directly",
"on",
"the",
"Component",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L81-L100 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java | VueComponentOptions.addJavaComputed | @JsOverlay
public final void addJavaComputed(Function javaMethod, String computedPropertyName,
ComputedKind kind) {
ComputedOptions computedDefinition = getComputedOptions(computedPropertyName);
if (computedDefinition == null) {
computedDefinition = new ComputedOptions();
addComputedOptions(... | java | @JsOverlay
public final void addJavaComputed(Function javaMethod, String computedPropertyName,
ComputedKind kind) {
ComputedOptions computedDefinition = getComputedOptions(computedPropertyName);
if (computedDefinition == null) {
computedDefinition = new ComputedOptions();
addComputedOptions(... | [
"@",
"JsOverlay",
"public",
"final",
"void",
"addJavaComputed",
"(",
"Function",
"javaMethod",
",",
"String",
"computedPropertyName",
",",
"ComputedKind",
"kind",
")",
"{",
"ComputedOptions",
"computedDefinition",
"=",
"getComputedOptions",
"(",
"computedPropertyName",
... | Add a computed property to this ComponentOptions. If the computed has both a getter and a
setter, this will be called twice, once for each.
@param javaMethod Function pointer to the method in the {@link IsVueComponent}
@param computedPropertyName Name of the computed property in the Template and the
ComponentOptions
@... | [
"Add",
"a",
"computed",
"property",
"to",
"this",
"ComponentOptions",
".",
"If",
"the",
"computed",
"has",
"both",
"a",
"getter",
"and",
"a",
"setter",
"this",
"will",
"be",
"called",
"twice",
"once",
"for",
"each",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L111-L125 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java | VueComponentOptions.addJavaWatch | @JsOverlay
public final void addJavaWatch(Function javaMethod, String watchedPropertyName,
boolean isDeep, boolean isImmediate) {
if (!isDeep && !isImmediate) {
addWatch(watchedPropertyName, javaMethod);
return;
}
JsPropertyMap<Object> watchDefinition = JsPropertyMap.of();
watchDefi... | java | @JsOverlay
public final void addJavaWatch(Function javaMethod, String watchedPropertyName,
boolean isDeep, boolean isImmediate) {
if (!isDeep && !isImmediate) {
addWatch(watchedPropertyName, javaMethod);
return;
}
JsPropertyMap<Object> watchDefinition = JsPropertyMap.of();
watchDefi... | [
"@",
"JsOverlay",
"public",
"final",
"void",
"addJavaWatch",
"(",
"Function",
"javaMethod",
",",
"String",
"watchedPropertyName",
",",
"boolean",
"isDeep",
",",
"boolean",
"isImmediate",
")",
"{",
"if",
"(",
"!",
"isDeep",
"&&",
"!",
"isImmediate",
")",
"{",
... | Add a watch property to this Component Definition
@param javaMethod Function pointer to the method in the {@link IsVueComponent}
@param watchedPropertyName Name of the property name to watch in the data model
@param isDeep Is the watcher deep (will watch child properties)
@param isImmediate Is the watcher immediate (w... | [
"Add",
"a",
"watch",
"property",
"to",
"this",
"Component",
"Definition"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L135-L148 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java | VueComponentOptions.addJavaProp | @JsOverlay
public final void addJavaProp(String propName, String fieldName, boolean required,
String exposedTypeName) {
if (propsToProxy == null) {
propsToProxy = new HashSet<>();
}
PropOptions propDefinition = new PropOptions();
propDefinition.required = required;
if (exposedTypeNam... | java | @JsOverlay
public final void addJavaProp(String propName, String fieldName, boolean required,
String exposedTypeName) {
if (propsToProxy == null) {
propsToProxy = new HashSet<>();
}
PropOptions propDefinition = new PropOptions();
propDefinition.required = required;
if (exposedTypeNam... | [
"@",
"JsOverlay",
"public",
"final",
"void",
"addJavaProp",
"(",
"String",
"propName",
",",
"String",
"fieldName",
",",
"boolean",
"required",
",",
"String",
"exposedTypeName",
")",
"{",
"if",
"(",
"propsToProxy",
"==",
"null",
")",
"{",
"propsToProxy",
"=",
... | Add a prop to our ComponentOptions. This will allow to receive data from the outside of our
Component.
@param propName The name of the prop
@param fieldName The name of the java field for that prop
@param required Is the property required (mandatory)
@param exposedTypeName JS name of the type of this property, if not ... | [
"Add",
"a",
"prop",
"to",
"our",
"ComponentOptions",
".",
"This",
"will",
"allow",
"to",
"receive",
"data",
"from",
"the",
"outside",
"of",
"our",
"Component",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/component/options/VueComponentOptions.java#L171-L187 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/template/ComponentTemplateProcessor.java | ComponentTemplateProcessor.findLocalComponentsForComponent | private void findLocalComponentsForComponent(LocalComponents localComponents,
TypeElement componentTypeElement) {
Component componentAnnotation = componentTypeElement.getAnnotation(Component.class);
if (componentAnnotation == null) {
return;
}
processLocalComponentClass(localComponents, com... | java | private void findLocalComponentsForComponent(LocalComponents localComponents,
TypeElement componentTypeElement) {
Component componentAnnotation = componentTypeElement.getAnnotation(Component.class);
if (componentAnnotation == null) {
return;
}
processLocalComponentClass(localComponents, com... | [
"private",
"void",
"findLocalComponentsForComponent",
"(",
"LocalComponents",
"localComponents",
",",
"TypeElement",
"componentTypeElement",
")",
"{",
"Component",
"componentAnnotation",
"=",
"componentTypeElement",
".",
"getAnnotation",
"(",
"Component",
".",
"class",
")",... | Register all locally declared components.
@param localComponents The {@link LocalComponents} where we register our local components
@param componentTypeElement The class to process | [
"Register",
"all",
"locally",
"declared",
"components",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/ComponentTemplateProcessor.java#L186-L206 | train |
VueGWT/vue-gwt | core/src/main/java/com/axellience/vuegwt/core/client/observer/VueGWTObserverManager.java | VueGWTObserverManager.customizeVueObserverPrototype | public void customizeVueObserverPrototype(VueObserver vueObserver) {
vueObserveArrayFunction = vueObserver.getObserveArray();
vueWalkFunction = vueObserver.getWalk();
vueObserver.setWalk(toObserve -> {
if (observeJavaObject(toObserve)) {
return;
}
vueWalkFunction.call(this, toObs... | java | public void customizeVueObserverPrototype(VueObserver vueObserver) {
vueObserveArrayFunction = vueObserver.getObserveArray();
vueWalkFunction = vueObserver.getWalk();
vueObserver.setWalk(toObserve -> {
if (observeJavaObject(toObserve)) {
return;
}
vueWalkFunction.call(this, toObs... | [
"public",
"void",
"customizeVueObserverPrototype",
"(",
"VueObserver",
"vueObserver",
")",
"{",
"vueObserveArrayFunction",
"=",
"vueObserver",
".",
"getObserveArray",
"(",
")",
";",
"vueWalkFunction",
"=",
"vueObserver",
".",
"getWalk",
"(",
")",
";",
"vueObserver",
... | Customize the VueObserver instance. We get in between to be warned whenever an object is
observed and observe it using our Java observers if necessary.
@param vueObserver A {@link VueObserver} | [
"Customize",
"the",
"VueObserver",
"instance",
".",
"We",
"get",
"in",
"between",
"to",
"be",
"warned",
"whenever",
"an",
"object",
"is",
"observed",
"and",
"observe",
"it",
"using",
"our",
"Java",
"observers",
"if",
"necessary",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/core/src/main/java/com/axellience/vuegwt/core/client/observer/VueGWTObserverManager.java#L135-L146 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/utils/InjectedDependenciesUtil.java | InjectedDependenciesUtil.hasInjectAnnotation | public static boolean hasInjectAnnotation(Element element) {
for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {
String annotationQualifiedName = annotationMirror.getAnnotationType().toString();
if (annotationQualifiedName.equals(Inject.class.getCanonicalName())) {
return ... | java | public static boolean hasInjectAnnotation(Element element) {
for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {
String annotationQualifiedName = annotationMirror.getAnnotationType().toString();
if (annotationQualifiedName.equals(Inject.class.getCanonicalName())) {
return ... | [
"public",
"static",
"boolean",
"hasInjectAnnotation",
"(",
"Element",
"element",
")",
"{",
"for",
"(",
"AnnotationMirror",
"annotationMirror",
":",
"element",
".",
"getAnnotationMirrors",
"(",
")",
")",
"{",
"String",
"annotationQualifiedName",
"=",
"annotationMirror"... | Check if the given element has an Inject annotation. Either the one from Google Gin, or the
javax one. We don't want to depend on Gin, so we check the google one based on qualifiedName
@param element The element we want to check
@return True if has an Inject annotation, false otherwise | [
"Check",
"if",
"the",
"given",
"element",
"has",
"an",
"Inject",
"annotation",
".",
"Either",
"the",
"one",
"from",
"Google",
"Gin",
"or",
"the",
"javax",
"one",
".",
"We",
"don",
"t",
"want",
"to",
"depend",
"on",
"Gin",
"so",
"we",
"check",
"the",
... | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/utils/InjectedDependenciesUtil.java#L38-L49 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/directive/VueDirectiveOptionsGenerator.java | VueDirectiveOptionsGenerator.generate | public void generate(TypeElement directiveTypeElement) {
ClassName optionsClassName = GeneratorsNameUtil.directiveOptionsName(directiveTypeElement);
Builder componentClassBuilder = TypeSpec
.classBuilder(optionsClassName)
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.superclass(VueDir... | java | public void generate(TypeElement directiveTypeElement) {
ClassName optionsClassName = GeneratorsNameUtil.directiveOptionsName(directiveTypeElement);
Builder componentClassBuilder = TypeSpec
.classBuilder(optionsClassName)
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.superclass(VueDir... | [
"public",
"void",
"generate",
"(",
"TypeElement",
"directiveTypeElement",
")",
"{",
"ClassName",
"optionsClassName",
"=",
"GeneratorsNameUtil",
".",
"directiveOptionsName",
"(",
"directiveTypeElement",
")",
";",
"Builder",
"componentClassBuilder",
"=",
"TypeSpec",
".",
... | Generate and save the Java file for the typeElement passed to the constructor
@param directiveTypeElement The {@link VueDirective} class to generate {@link
VueDirectiveOptions} from | [
"Generate",
"and",
"save",
"the",
"Java",
"file",
"for",
"the",
"typeElement",
"passed",
"to",
"the",
"constructor"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/directive/VueDirectiveOptionsGenerator.java#L40-L71 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.exposeExposedFieldsToJs | private void exposeExposedFieldsToJs() {
if (fieldsWithNameExposed.isEmpty()) {
return;
}
MethodSpec.Builder exposeFieldMethod = MethodSpec
.methodBuilder("vg$ef")
.addAnnotation(JsMethod.class);
fieldsWithNameExposed
.forEach(field -> exposeFieldMethod
.addSt... | java | private void exposeExposedFieldsToJs() {
if (fieldsWithNameExposed.isEmpty()) {
return;
}
MethodSpec.Builder exposeFieldMethod = MethodSpec
.methodBuilder("vg$ef")
.addAnnotation(JsMethod.class);
fieldsWithNameExposed
.forEach(field -> exposeFieldMethod
.addSt... | [
"private",
"void",
"exposeExposedFieldsToJs",
"(",
")",
"{",
"if",
"(",
"fieldsWithNameExposed",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"MethodSpec",
".",
"Builder",
"exposeFieldMethod",
"=",
"MethodSpec",
".",
"methodBuilder",
"(",
"\"vg$ef\"",... | Generate a method that use all the fields we want to determine the name of at runtime. This is
to avoid GWT optimizing away assignation on those fields. | [
"Generate",
"a",
"method",
"that",
"use",
"all",
"the",
"fields",
"we",
"want",
"to",
"determine",
"the",
"name",
"of",
"at",
"runtime",
".",
"This",
"is",
"to",
"avoid",
"GWT",
"optimizing",
"away",
"assignation",
"on",
"those",
"fields",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L290-L318 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processComputed | private void processComputed() {
getMethodsWithAnnotation(component, Computed.class).forEach(method -> {
ComputedKind kind = ComputedKind.GETTER;
if ("void".equals(method.getReturnType().toString())) {
kind = ComputedKind.SETTER;
}
String exposedMethodName = exposeExistingJavaMethod... | java | private void processComputed() {
getMethodsWithAnnotation(component, Computed.class).forEach(method -> {
ComputedKind kind = ComputedKind.GETTER;
if ("void".equals(method.getReturnType().toString())) {
kind = ComputedKind.SETTER;
}
String exposedMethodName = exposeExistingJavaMethod... | [
"private",
"void",
"processComputed",
"(",
")",
"{",
"getMethodsWithAnnotation",
"(",
"component",
",",
"Computed",
".",
"class",
")",
".",
"forEach",
"(",
"method",
"->",
"{",
"ComputedKind",
"kind",
"=",
"ComputedKind",
".",
"GETTER",
";",
"if",
"(",
"\"vo... | Process computed properties from the Component Class. | [
"Process",
"computed",
"properties",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L351-L374 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.addFieldsForComputedMethod | private void addFieldsForComputedMethod(TypeElement component, Set<String> alreadyDone) {
getMethodsWithAnnotation(component, Computed.class).forEach(method -> {
String propertyName = computedPropertyNameToFieldName(getComputedPropertyName(method));
if (alreadyDone.contains(propertyName)) {
ret... | java | private void addFieldsForComputedMethod(TypeElement component, Set<String> alreadyDone) {
getMethodsWithAnnotation(component, Computed.class).forEach(method -> {
String propertyName = computedPropertyNameToFieldName(getComputedPropertyName(method));
if (alreadyDone.contains(propertyName)) {
ret... | [
"private",
"void",
"addFieldsForComputedMethod",
"(",
"TypeElement",
"component",
",",
"Set",
"<",
"String",
">",
"alreadyDone",
")",
"{",
"getMethodsWithAnnotation",
"(",
"component",
",",
"Computed",
".",
"class",
")",
".",
"forEach",
"(",
"method",
"->",
"{",... | Add fields for computed methods so they are visible in the template
@param component Component we are currently processing
@param alreadyDone Already processed computed properties (in case there is a getter and a | [
"Add",
"fields",
"for",
"computed",
"methods",
"so",
"they",
"are",
"visible",
"in",
"the",
"template"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L415-L436 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processWatchers | private void processWatchers(MethodSpec.Builder createdMethodBuilder) {
createdMethodBuilder.addStatement("Proto p = __proto__");
getMethodsWithAnnotation(component, Watch.class)
.forEach(method -> processWatcher(createdMethodBuilder, method));
} | java | private void processWatchers(MethodSpec.Builder createdMethodBuilder) {
createdMethodBuilder.addStatement("Proto p = __proto__");
getMethodsWithAnnotation(component, Watch.class)
.forEach(method -> processWatcher(createdMethodBuilder, method));
} | [
"private",
"void",
"processWatchers",
"(",
"MethodSpec",
".",
"Builder",
"createdMethodBuilder",
")",
"{",
"createdMethodBuilder",
".",
"addStatement",
"(",
"\"Proto p = __proto__\"",
")",
";",
"getMethodsWithAnnotation",
"(",
"component",
",",
"Watch",
".",
"class",
... | Process watchers from the Component Class.
@param createdMethodBuilder Builder for the created hook method | [
"Process",
"watchers",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L453-L457 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processWatcher | private void processWatcher(MethodSpec.Builder createdMethodBuilder, ExecutableElement method) {
Watch watch = method.getAnnotation(Watch.class);
String exposedMethodName = exposeExistingJavaMethodToJs(method);
String watcherTriggerMethodName = addNewMethodToProto();
MethodSpec.Builder watcherMethodBu... | java | private void processWatcher(MethodSpec.Builder createdMethodBuilder, ExecutableElement method) {
Watch watch = method.getAnnotation(Watch.class);
String exposedMethodName = exposeExistingJavaMethodToJs(method);
String watcherTriggerMethodName = addNewMethodToProto();
MethodSpec.Builder watcherMethodBu... | [
"private",
"void",
"processWatcher",
"(",
"MethodSpec",
".",
"Builder",
"createdMethodBuilder",
",",
"ExecutableElement",
"method",
")",
"{",
"Watch",
"watch",
"=",
"method",
".",
"getAnnotation",
"(",
"Watch",
".",
"class",
")",
";",
"String",
"exposedMethodName"... | Process a watcher from the Component Class.
@param createdMethodBuilder Builder for the created hook method
@param method The method we are currently processing | [
"Process",
"a",
"watcher",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L465-L494 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processPropValidators | private void processPropValidators() {
getMethodsWithAnnotation(component, PropValidator.class).forEach(method -> {
PropValidator propValidator = method.getAnnotation(PropValidator.class);
if (!TypeName.get(method.getReturnType()).equals(TypeName.BOOLEAN)) {
printError("Method "
+ m... | java | private void processPropValidators() {
getMethodsWithAnnotation(component, PropValidator.class).forEach(method -> {
PropValidator propValidator = method.getAnnotation(PropValidator.class);
if (!TypeName.get(method.getReturnType()).equals(TypeName.BOOLEAN)) {
printError("Method "
+ m... | [
"private",
"void",
"processPropValidators",
"(",
")",
"{",
"getMethodsWithAnnotation",
"(",
"component",
",",
"PropValidator",
".",
"class",
")",
".",
"forEach",
"(",
"method",
"->",
"{",
"PropValidator",
"propValidator",
"=",
"method",
".",
"getAnnotation",
"(",
... | Process prop validators from the Component Class. | [
"Process",
"prop",
"validators",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L499-L515 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processPropDefaultValues | private void processPropDefaultValues() {
getMethodsWithAnnotation(component, PropDefault.class).forEach(method -> {
PropDefault propValidator = method.getAnnotation(PropDefault.class);
String exposedMethodName = exposeExistingJavaMethodToJs(method);
String propertyName = propValidator.value();
... | java | private void processPropDefaultValues() {
getMethodsWithAnnotation(component, PropDefault.class).forEach(method -> {
PropDefault propValidator = method.getAnnotation(PropDefault.class);
String exposedMethodName = exposeExistingJavaMethodToJs(method);
String propertyName = propValidator.value();
... | [
"private",
"void",
"processPropDefaultValues",
"(",
")",
"{",
"getMethodsWithAnnotation",
"(",
"component",
",",
"PropDefault",
".",
"class",
")",
".",
"forEach",
"(",
"method",
"->",
"{",
"PropDefault",
"propValidator",
"=",
"method",
".",
"getAnnotation",
"(",
... | Process prop default values from the Component Class. | [
"Process",
"prop",
"default",
"values",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L520-L530 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processHooks | private void processHooks(Set<ExecutableElement> hookMethodsFromInterfaces) {
ElementFilter
.methodsIn(component.getEnclosedElements())
.stream()
.filter(method -> isHookMethod(component, method, hookMethodsFromInterfaces))
// Created hook is already added by createCreatedHook
... | java | private void processHooks(Set<ExecutableElement> hookMethodsFromInterfaces) {
ElementFilter
.methodsIn(component.getEnclosedElements())
.stream()
.filter(method -> isHookMethod(component, method, hookMethodsFromInterfaces))
// Created hook is already added by createCreatedHook
... | [
"private",
"void",
"processHooks",
"(",
"Set",
"<",
"ExecutableElement",
">",
"hookMethodsFromInterfaces",
")",
"{",
"ElementFilter",
".",
"methodsIn",
"(",
"component",
".",
"getEnclosedElements",
"(",
")",
")",
".",
"stream",
"(",
")",
".",
"filter",
"(",
"m... | Process hook methods from the Component Class.
@param hookMethodsFromInterfaces Hook methods from the interface the {@link IsVueComponent}
implements | [
"Process",
"hook",
"methods",
"from",
"the",
"Component",
"Class",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L538-L551 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.getHookMethodsFromInterfaces | private Set<ExecutableElement> getHookMethodsFromInterfaces() {
return component
.getInterfaces()
.stream()
.map(DeclaredType.class::cast)
.map(DeclaredType::asElement)
.map(TypeElement.class::cast)
.flatMap(typeElement -> ElementFilter
.methodsIn(typeElem... | java | private Set<ExecutableElement> getHookMethodsFromInterfaces() {
return component
.getInterfaces()
.stream()
.map(DeclaredType.class::cast)
.map(DeclaredType::asElement)
.map(TypeElement.class::cast)
.flatMap(typeElement -> ElementFilter
.methodsIn(typeElem... | [
"private",
"Set",
"<",
"ExecutableElement",
">",
"getHookMethodsFromInterfaces",
"(",
")",
"{",
"return",
"component",
".",
"getInterfaces",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
"(",
"DeclaredType",
".",
"class",
"::",
"cast",
")",
".",
"map",
"(... | Return all hook methods from the implemented interfaces
@return Hook methods that must be overridden in the Component | [
"Return",
"all",
"hook",
"methods",
"from",
"the",
"implemented",
"interfaces"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L558-L571 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.processRenderFunction | private void processRenderFunction() {
if (!hasInterface(processingEnv, component.asType(), HasRender.class)) {
return;
}
componentExposedTypeBuilder.addMethod(MethodSpec
.methodBuilder("vg$render")
.addModifiers(Modifier.PUBLIC)
.addAnnotation(JsMethod.class)
.returns... | java | private void processRenderFunction() {
if (!hasInterface(processingEnv, component.asType(), HasRender.class)) {
return;
}
componentExposedTypeBuilder.addMethod(MethodSpec
.methodBuilder("vg$render")
.addModifiers(Modifier.PUBLIC)
.addAnnotation(JsMethod.class)
.returns... | [
"private",
"void",
"processRenderFunction",
"(",
")",
"{",
"if",
"(",
"!",
"hasInterface",
"(",
"processingEnv",
",",
"component",
".",
"asType",
"(",
")",
",",
"HasRender",
".",
"class",
")",
")",
"{",
"return",
";",
"}",
"componentExposedTypeBuilder",
".",... | Process the render function from the Component Class if it has one. | [
"Process",
"the",
"render",
"function",
"from",
"the",
"Component",
"Class",
"if",
"it",
"has",
"one",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L584-L602 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.createCreatedHook | private void createCreatedHook(ComponentInjectedDependenciesBuilder dependenciesBuilder) {
String hasRunCreatedFlagName = "vg$hrc_" + getSuperComponentCount(component);
componentExposedTypeBuilder
.addField(
FieldSpec.builder(boolean.class, hasRunCreatedFlagName, Modifier.PUBLIC)
... | java | private void createCreatedHook(ComponentInjectedDependenciesBuilder dependenciesBuilder) {
String hasRunCreatedFlagName = "vg$hrc_" + getSuperComponentCount(component);
componentExposedTypeBuilder
.addField(
FieldSpec.builder(boolean.class, hasRunCreatedFlagName, Modifier.PUBLIC)
... | [
"private",
"void",
"createCreatedHook",
"(",
"ComponentInjectedDependenciesBuilder",
"dependenciesBuilder",
")",
"{",
"String",
"hasRunCreatedFlagName",
"=",
"\"vg$hrc_\"",
"+",
"getSuperComponentCount",
"(",
"component",
")",
";",
"componentExposedTypeBuilder",
".",
"addFiel... | Create the "created" hook method. This method will be called on each Component when it's
created. It will inject dependencies if any.
@param dependenciesBuilder Builder for our component dependencies, needed here to inject the
dependencies in the instance | [
"Create",
"the",
"created",
"hook",
"method",
".",
"This",
"method",
"will",
"be",
"called",
"on",
"each",
"Component",
"when",
"it",
"s",
"created",
".",
"It",
"will",
"inject",
"dependencies",
"if",
"any",
"."
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L631-L667 | train |
VueGWT/vue-gwt | processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java | ComponentExposedTypeGenerator.initFieldsValues | private void initFieldsValues(TypeElement component, MethodSpec.Builder createdMethodBuilder) {
// Do not init instance fields for abstract components
if (component.getModifiers().contains(Modifier.ABSTRACT)) {
return;
}
createdMethodBuilder.addStatement(
"$T.initComponentInstanceFields(t... | java | private void initFieldsValues(TypeElement component, MethodSpec.Builder createdMethodBuilder) {
// Do not init instance fields for abstract components
if (component.getModifiers().contains(Modifier.ABSTRACT)) {
return;
}
createdMethodBuilder.addStatement(
"$T.initComponentInstanceFields(t... | [
"private",
"void",
"initFieldsValues",
"(",
"TypeElement",
"component",
",",
"MethodSpec",
".",
"Builder",
"createdMethodBuilder",
")",
"{",
"// Do not init instance fields for abstract components",
"if",
"(",
"component",
".",
"getModifiers",
"(",
")",
".",
"contains",
... | Init fields at creation by using an instance of the Java class
@param component {@link IsVueComponent} to process
@param createdMethodBuilder Builder for our Create method | [
"Init",
"fields",
"at",
"creation",
"by",
"using",
"an",
"instance",
"of",
"the",
"Java",
"class"
] | 961cd83aed6fe8e2dd80c279847f1b3f62918a1f | https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/ComponentExposedTypeGenerator.java#L736-L746 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.